def objects(ctx, format: str): url = ctx.obj["api_server_url"] format = AvailableFormat(format) print( get_state_api_output_to_print( list_objects(api_server_url=url, _explain=_should_explain(format)), format=format, ) )
def objects(ctx, format: str, filter: List[Tuple[str, str]]): url = ctx.obj["api_server_url"] format = AvailableFormat(format) print( get_state_api_output_to_print( list_objects( api_server_url=url, filters=filter, _explain=_should_explain(format), ), format=format, ) )
def test_list_objects(shutdown_only): ray.init() import numpy as np data = np.ones(50 * 1024 * 1024, dtype=np.uint8) plasma_obj = ray.put(data) @ray.remote def f(obj): print(obj) ray.get(f.remote(plasma_obj)) def verify(): obj = list(list_objects().values())[0] # For detailed output, the test is covered from `test_memstat.py` return obj["object_id"] == plasma_obj.hex() wait_for_condition(verify) print(list_objects())
def objects(ctx): url = ctx.obj["api_server_url"] pprint(list_objects(url))
def verify(): obj = list(list_objects().values())[0] # For detailed output, the test is covered from `test_memstat.py` return obj["object_id"] == plasma_obj.hex()
def verify(): # There's only 1 object. result = list_objects( filters=[("pid", pid), ("reference_type", "LOCAL_REFERENCE")]) return len(result) == 1
def objects(ctx, format: str): url = ctx.obj["api_server_url"] print( get_state_api_output_to_print(list_objects(api_server_url=url), format=AvailableFormat(format)))