Skip to content

Instantly share code, notes, and snippets.

@stephanie-wang
Created September 2, 2020 00:29
Show Gist options
  • Save stephanie-wang/1fb8290e7edb630c33fe9c1dc1507814 to your computer and use it in GitHub Desktop.
Save stephanie-wang/1fb8290e7edb630c33fe9c1dc1507814 to your computer and use it in GitHub Desktop.
Test zombie raylet processes
import ray
import numpy as np
import time
ray.init(address="auto")
@ray.remote
def f(x):
time.sleep(0.1)
return x
while len(ray.nodes()) < 4:
time.sleep(1)
print("waiting for cluster")
time.sleep(30)
assert all([node['Alive'] for node in ray.nodes()]), len(ray.nodes())
objs = [f.remote(np.zeros(int(5e5))) for _ in range(100)]
ray.get([f.remote(obj) for obj in objs])
print("done")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment