SHARE
TWEET

Untitled

a guest Jan 20th, 2019 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. g = [1, 2, 3, 4]
  2.    
  3. @ray.remote
  4. def f(*g):    # *g is
  5.     return np.mean(g, axis=0)
  6. f_ids = [f.remote(*g) for _ in range(10)]
  7. print(ray.get(f.remote(*f_ids)))
  8.    
  9. @ray.remote
  10. def f(g):    # g is object ID list
  11.     return np.mean(g, axis=0)
  12. f_ids = [f.remote(g) for _ in range(10)]
  13. print(ray.get(f.remote(f_ids)))
  14.    
  15. @remote
  16. def f(g1, g2):    # g1 and g2 are object ID lists
  17.     ...           # do something here
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top