Examples of using Agit training
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
431 B

import os
import ray
The following switch allows the program to run locally or on the Agit distributed cluster without modifications.
if 'CLOUD_PROVIDER' in os.environ and os.environ['CLOUD_PROVIDER'] == 'Agit':
from agit import ray_init
# Object IDs can be created by `ray.put` and results can be obtained by `ray.get`.
y = 1
object_id = ray.put(y)
assert ray.get(object_id) == 1