mirror of
https://github.com/wassname/ray.git
synced 2026-07-26 13:37:24 +08:00
Fix actor garbage collection by breaking cyclic references (#1064)
* Fix bug in wait_for_pid_to_exit, add test for actor deletion. * Fix actor garbage collection by breaking cyclic references * Add test for calling actor method immediately after actor creation. * Fix bug, must dispatch tasks when workers are killed. * Fix python test * Fix cyclic reference problem by creating ActorMethod objects on the fly. * Try simply increasing the time allowed for many_drivers_test.py.
This commit is contained in:
committed by
Robert Nishihara
parent
971becc905
commit
aebe9f9374
@@ -30,10 +30,10 @@ class Actor1(object):
|
||||
|
||||
|
||||
def driver(redis_address, driver_index):
|
||||
"""The script for driver 0.
|
||||
"""The script for all drivers.
|
||||
|
||||
This driver should create five actors that each use one GPU and some actors
|
||||
that use no GPUs. After a while, it should exit.
|
||||
This driver should create five actors that each use one GPU. After a while,
|
||||
it should exit.
|
||||
"""
|
||||
ray.init(redis_address=redis_address)
|
||||
|
||||
@@ -44,7 +44,7 @@ def driver(redis_address, driver_index):
|
||||
for i in range(driver_index - max_concurrent_drivers + 1):
|
||||
_wait_for_event("DRIVER_{}_DONE".format(i), redis_address)
|
||||
|
||||
def try_to_create_actor(actor_class, timeout=100):
|
||||
def try_to_create_actor(actor_class, timeout=500):
|
||||
# Try to create an actor, but allow failures while we wait for the
|
||||
# monitor to release the resources for the removed drivers.
|
||||
start_time = time.time()
|
||||
|
||||
Reference in New Issue
Block a user