mirror of
https://github.com/wassname/ray.git
synced 2026-07-06 05:16:30 +08:00
Fix actor ID collision in local mode (#5863)
* Fixed local mode actor id * Update python/ray/actor.py Co-Authored-By: Edward Oakes <ed.nmi.oakes@gmail.com> * Added hyphen to match comments * Added tests to test_local_mode * Helloworld * Better test naming * lint
This commit is contained in:
+1
-3
@@ -369,9 +369,7 @@ class ActorClass(object):
|
||||
# Instead, instantiate the actor locally and add it to the worker's
|
||||
# dictionary
|
||||
if worker.mode == ray.LOCAL_MODE:
|
||||
actor_id = ActorID.of(worker.current_job_id,
|
||||
worker.current_task_id,
|
||||
worker.task_context.task_index + 1)
|
||||
actor_id = ActorID.from_random()
|
||||
worker.actors[actor_id] = meta.modified_class(
|
||||
*copy.deepcopy(args), **copy.deepcopy(kwargs))
|
||||
core_handle = ray._raylet.ActorHandle(
|
||||
|
||||
Reference in New Issue
Block a user