MCPcopy
hub / github.com/InternLM/lmdeploy / shared_ray_manager

Function shared_ray_manager

autotest/conftest.py:39–55  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

37
38@pytest.fixture(scope='session')
39def shared_ray_manager():
40 master_addr = DEFAULT_SERVER
41 env_config = get_config()
42 run_id = os.environ.get('RUN_ID', 'local_run')
43 log_dir = os.path.join(env_config.get('server_log_path', '/tmp/lmdeploy_test'), str(run_id).replace('/', '_'))
44
45 manager = RayLMDeployManager(master_addr=master_addr, api_port=PROXY_PORT, log_dir=log_dir, health_check=True)
46
47 manager.start_ray_cluster()
48
49 if manager.is_master:
50 print('🎯 Master node: Ray cluster started, waiting for worker nodes to join...')
51
52 yield manager
53
54 print(f'\n[Final Cleanup] Node {manager.node_rank} performing final resource cleanup...')
55 manager.cleanup(force=True)
56
57
58@pytest.fixture(scope='session')

Callers

nothing calls this directly

Calls 6

start_ray_clusterMethod · 0.95
cleanupMethod · 0.95
get_configFunction · 0.90
RayLMDeployManagerClass · 0.90
joinMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected