Skip to content

Commit

Permalink
fix ray dag serialization for local mode
Browse files Browse the repository at this point in the history
  • Loading branch information
chaokunyang committed Jun 27, 2022
1 parent f93763d commit 706bdf4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mars/deploy/oscar/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
from ...lib.aio import get_isolation, stop_isolation
from ...oscar.backends.router import Router
from ...resource import cpu_count, cuda_count, mem_total
from ...serialization.ray import register_ray_serializers, unregister_ray_serializers
from ...services import NodeRole
from ...services.task.execution.api import ExecutionConfig
from ...typing import ClusterType, ClientType
Expand Down Expand Up @@ -162,6 +163,8 @@ def __init__(
self._config = load_config(config, default_config_file=DEFAULT_CONFIG_FILE)
execution_config = ExecutionConfig.from_config(self._config, backend=backend)
self._backend = execution_config.backend
if self._backend == "ray":
register_ray_serializers()
self._web = web
self._n_supervisor_process = n_supervisor_process

Expand Down Expand Up @@ -290,6 +293,8 @@ async def stop(self):
AbstractSession.reset_default()
self._exiting_check_task.cancel()
Router.set_instance(None)
if self._backend == "ray":
unregister_ray_serializers()


class LocalClient:
Expand Down

0 comments on commit 706bdf4

Please sign in to comment.