Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
s5u13b committed Feb 12, 2025
1 parent 0c31af8 commit 00d3273
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
7 changes: 5 additions & 2 deletions llumnix/entrypoints/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,11 @@ def init_llumnix_components(entrypoints_args: EntrypointsArgs,
ray.get(instance.is_ready.remote())
available_instance_ids.append(instance_id)
available_instances.append(instance)
except:
logger.info("Instance {} is dead.".format(instance_id))
# pylint: disable=broad-except
except Exception as e:
logger.error("Instance {} is dead.".format(instance_id))
logger.error("Unexpected exception occurs: {}".format(e))
logger.error("Exception traceback: {}".format(traceback.format_exc()))
retry_manager_method_sync(manager.scale_down.remote, 'scale_down', instance_id)

ip = get_ip_address()
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e_test/test_correctness.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
import ray
import torch

from llumnix.entrypoints.utils import get_ip_address

from vllm import LLM, SamplingParams

from llumnix.entrypoints.utils import get_ip_address

# pylint: disable=unused-import
from tests.conftest import ray_env
from .utils import (generate_launch_command, generate_serve_command, wait_for_llumnix_service_ready,
Expand Down
3 changes: 1 addition & 2 deletions tests/unit_test/global_scheduler/test_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@
from llumnix.server_info import ServerInfo
from llumnix.queue.queue_type import QueueType
from llumnix.global_scheduler.scaling_scheduler import InstanceType
from llumnix.backends.vllm.sim_llm_engine import BackendSimVLLM
from llumnix.backends.backend_interface import BackendType
from llumnix.backends.profiling import LatencyMemData
from llumnix.entrypoints.utils import LaunchMode
from llumnix.utils import (get_placement_group_name, get_server_name, get_instance_name,
remove_placement_group, INSTANCE_NAME_PREFIX, kill_server,
Expand Down Expand Up @@ -223,6 +221,7 @@ def test_init_instances_sim(ray_env, manager):
engine_args = EngineArgs(model="facebook/opt-125m", worker_use_ray=True)
_, _ = ray.get(manager.init_instances.remote(QueueType("rayqueue"), BackendType.SIM_VLLM,
InstanceArgs(profiling_result_file_path="/"), engine_args))
# pylint: disable=broad-except
except Exception as e:
assert isinstance(e, IsADirectoryError)

Expand Down

0 comments on commit 00d3273

Please sign in to comment.