From e70ddce4e336e5e4aca6673d09b42c36c0c15a78 Mon Sep 17 00:00:00 2001 From: s5u13b Date: Wed, 16 Oct 2024 11:31:04 +0000 Subject: [PATCH] Fix lint --- Makefile | 1 + llumnix/llm_engine_manager.py | 5 +++-- tests/e2e_test/test_bench.py | 1 - tests/e2e_test/test_e2e.py | 2 +- tests/e2e_test/test_migration.py | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 9b67429f..6bc87a9b 100644 --- a/Makefile +++ b/Makefile @@ -32,6 +32,7 @@ test: check_pytest_installed @pytest -x -v --ignore=third_party/ --ignore=tests/e2e_test --disable-warnings @python examlpes/offline_inference.py @pytest -v tests/e2e_test/test_e2e.py + @pytest -v -x ./tests/e2e_test/test_migration.py .PHONY: unit_test unit_test: check_pytest_installed diff --git a/llumnix/llm_engine_manager.py b/llumnix/llm_engine_manager.py index 6de5722b..7b47728b 100644 --- a/llumnix/llm_engine_manager.py +++ b/llumnix/llm_engine_manager.py @@ -77,8 +77,6 @@ def __init__(self, self.instance_migrating: Dict[str, bool] = {} self.pending_rebuild_migration_instances = 0 self.global_scheduler = GlobalScheduler(global_scheduler_config) - # When manager starts, it automatically connects to all existing instances. - self._connect_to_instances() self.polling_interval = engine_manager_args.polling_interval asyncio.create_task(self._update_instance_info_loop(self.polling_interval)) @@ -108,6 +106,9 @@ def __init__(self, self._init_instance_info_csv(engine_manager_args) self.instance_last_logged_empty = {} + # When manager starts, it automatically connects to all existing instances. + self._connect_to_instances() + async def generate( self, request_id: str, diff --git a/tests/e2e_test/test_bench.py b/tests/e2e_test/test_bench.py index 501d1296..b6d70d8f 100644 --- a/tests/e2e_test/test_bench.py +++ b/tests/e2e_test/test_bench.py @@ -16,7 +16,6 @@ import os import subprocess import pytest -import ray import torch import numpy as np diff --git a/tests/e2e_test/test_e2e.py b/tests/e2e_test/test_e2e.py index cb3d78ff..20e5c431 100644 --- a/tests/e2e_test/test_e2e.py +++ b/tests/e2e_test/test_e2e.py @@ -122,7 +122,7 @@ def generate_launch_command(result_filename: str = "", launch_ray_cluster: bool def launch_llumnix_service(model: str, max_model_len: int, port: int, migration_backend: str, launch_mode: str): command = generate_launch_command(model=model, max_model_len=max_model_len, port=port, migration_backend=migration_backend, - launch_mode=launch_mode) + launch_mode=launch_mode) subprocess.run(command, shell=True, check=True) def shutdown_llumnix_service(): diff --git a/tests/e2e_test/test_migration.py b/tests/e2e_test/test_migration.py index 5f08a15d..50f993d2 100644 --- a/tests/e2e_test/test_migration.py +++ b/tests/e2e_test/test_migration.py @@ -111,7 +111,7 @@ async def run_bench_command(command): assert process.returncode == 0 for i in range(device_count//2): - bench_command = generate_bench_command(ip_ports=f"127.0.0.1:{base_port+i}", model=model, num_prompts=10, + bench_command = generate_bench_command(ip_ports=f"127.0.0.1:{base_port+i}", model=model, num_prompts=300, dataset_type="sharegpt", dataset_path="/mnt/dataset/sharegpt_gpt4/sharegpt_gpt4.jsonl" , qps=10)