mirror of
https://github.com/wassname/ray.git
synced 2026-06-28 19:49:04 +08:00
ada58abcd9
* Fix pytest... * Release objects that have been spilled * GCS object table interface refactor * Add spilled URL to object location info * refactor to include spilled URL in notifications * improve tests * Add spilled URL to object directory results * Remove force restore call * Merge spilled URL and location * fix * CI * build * osx * Fix multitenancy issues * Skip windows tests
19 lines
613 B
Python
19 lines
613 B
Python
import ray
|
|
|
|
|
|
def force_spill_objects(object_refs):
|
|
"""Force spilling objects to external storage.
|
|
|
|
Args:
|
|
object_refs: Object refs of the objects to be
|
|
spilled.
|
|
"""
|
|
core_worker = ray.worker.global_worker.core_worker
|
|
# Make sure that the values are object refs.
|
|
for object_ref in object_refs:
|
|
if not isinstance(object_ref, ray.ObjectRef):
|
|
raise TypeError(
|
|
f"Attempting to call `force_spill_objects` on the "
|
|
f"value {object_ref}, which is not an ray.ObjectRef.")
|
|
return core_worker.force_spill_objects(object_refs)
|