[Hotfix] Fix ruff errors (#10073)
Signed-off-by: Woosuk Kwon <woosuk.kwon@berkeley.edu>
This commit is contained in:
parent
a02a50e6e5
commit
6a585a23d2
3
setup.py
3
setup.py
@ -382,8 +382,7 @@ def get_gaudi_sw_version():
|
|||||||
output = subprocess.run("hl-smi",
|
output = subprocess.run("hl-smi",
|
||||||
shell=True,
|
shell=True,
|
||||||
text=True,
|
text=True,
|
||||||
stdout=subprocess.PIPE,
|
capture_output=True,
|
||||||
stderr=subprocess.PIPE,
|
|
||||||
env={"ENABLE_CONSOLE": "true"})
|
env={"ENABLE_CONSOLE": "true"})
|
||||||
if output.returncode == 0 and output.stdout:
|
if output.returncode == 0 and output.stdout:
|
||||||
return output.stdout.split("\n")[2].replace(
|
return output.stdout.split("\n")[2].replace(
|
||||||
|
@ -34,7 +34,7 @@ class RayHPUExecutor(DistributedGPUExecutor):
|
|||||||
uses_ray: bool = True
|
uses_ray: bool = True
|
||||||
|
|
||||||
def _init_executor(self) -> None:
|
def _init_executor(self) -> None:
|
||||||
self.forward_dag: Optional["ray.dag.CompiledDAG"] = None
|
self.forward_dag: Optional[ray.dag.CompiledDAG] = None
|
||||||
# If the env var is set, it uses the Ray's compiled DAG API
|
# If the env var is set, it uses the Ray's compiled DAG API
|
||||||
# which optimizes the control plane overhead.
|
# which optimizes the control plane overhead.
|
||||||
# Run vLLM with VLLM_USE_RAY_COMPILED_DAG=1 to enable it.
|
# Run vLLM with VLLM_USE_RAY_COMPILED_DAG=1 to enable it.
|
||||||
|
@ -67,8 +67,7 @@ class Singleton(type):
|
|||||||
|
|
||||||
def __call__(cls, *args, **kwargs):
|
def __call__(cls, *args, **kwargs):
|
||||||
if cls not in cls._instances:
|
if cls not in cls._instances:
|
||||||
cls._instances[cls] = super(Singleton,
|
cls._instances[cls] = super().__call__(*args, **kwargs)
|
||||||
cls).__call__(*args, **kwargs)
|
|
||||||
return cls._instances[cls]
|
return cls._instances[cls]
|
||||||
|
|
||||||
|
|
||||||
@ -273,7 +272,7 @@ def precompute_indices_and_offsets(block_size, slot_mapping, is_prompt):
|
|||||||
return indices, offsets
|
return indices, offsets
|
||||||
|
|
||||||
|
|
||||||
class HpuModelAdapter():
|
class HpuModelAdapter:
|
||||||
|
|
||||||
def __init__(self, model, block_size, dtype, enforce_eager):
|
def __init__(self, model, block_size, dtype, enforce_eager):
|
||||||
self.model = model
|
self.model = model
|
||||||
@ -1643,7 +1642,7 @@ def _maybe_wrap_in_hpu_graph(*args, **kwargs):
|
|||||||
) if htorch.utils.internal.is_lazy() else HpuModelAdapter(*args, **kwargs)
|
) if htorch.utils.internal.is_lazy() else HpuModelAdapter(*args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
class HabanaProfilerCounterHelper():
|
class HabanaProfilerCounterHelper:
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.niter = 0
|
self.niter = 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user