diff --git a/main.py b/main.py index 2bf97a0..7936ca8 100644 --- a/main.py +++ b/main.py @@ -25,6 +25,7 @@ async def start_system(): } ray.init(ignore_reinit_error=True, + namespace="pretor", dashboard_host="0.0.0.0", dashboard_port=8265, runtime_env={"env_vars": env_vars}) diff --git a/pretor/utils/ray_hook.py b/pretor/utils/ray_hook.py index e836e00..90cdac9 100644 --- a/pretor/utils/ray_hook.py +++ b/pretor/utils/ray_hook.py @@ -35,7 +35,7 @@ class ActorList: @lru_cache(maxsize=128) def _get_cached_actor_handle(actor_name: str): """缓存接口""" - return ray.get_actor(actor_name) + return ray.get_actor(actor_name, namespace="pretor") def clear_actor_cache(): """清理接口"""