mirror of
https://github.com/vale981/ray
synced 2025-03-10 13:26:39 -04:00
22 lines
346 B
Python
22 lines
346 B
Python
"""
|
|
A dummy ray driver script that executes in subprocess. Prints namespace
|
|
from ray's runtime context for job submission API testing.
|
|
"""
|
|
|
|
import ray
|
|
|
|
|
|
def run():
|
|
ray.init()
|
|
|
|
@ray.remote
|
|
def foo():
|
|
return "bar"
|
|
|
|
ray.get(foo.remote())
|
|
|
|
print(ray.get_runtime_context().namespace)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
run()
|