import ray import requests ray.init() @ray.remote class Counter: def __init__(self): self.counter = 0 def inc(self): self.counter += 1 def get_counter(self): return self.counter counter = Counter.remote() for _ in range(5): ray.get(counter.inc.remote()) print(ray.get(counter.get_counter.remote())) print(requests.__version__)