Created
September 2, 2020 00:29
-
-
Save stephanie-wang/1fb8290e7edb630c33fe9c1dc1507814 to your computer and use it in GitHub Desktop.
Test zombie raylet processes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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