mirror of
https://github.com/wassname/ray.git
synced 2026-06-28 17:02:43 +08:00
[rllib] Replace ray.get() with ray_get_and_free() to optimize memory usage (#4586)
This commit is contained in:
@@ -30,6 +30,9 @@ def free(object_ids, local_only=False, delete_creating_tasks=False):
|
||||
"""
|
||||
worker = ray.worker.get_global_worker()
|
||||
|
||||
if ray.worker._mode() == ray.worker.LOCAL_MODE:
|
||||
return
|
||||
|
||||
if isinstance(object_ids, ray.ObjectID):
|
||||
object_ids = [object_ids]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user