If I wrote:
@ray.remote(num_cpus=9)
class Counter(object):
def __init__(self):
self.value = 0
def increment(self):
self.value += 1
return self.value
def get_counter(self):
return self.value
ray.init(address='ray://host:port', runtime_env=runtime_env)
counter_actor = Counter.remote()
It work fine. num_cpus works. But if I wrote in this way without annotation:
class Counter(object):
def __init__(self):
self.value = 0
def increment(self):
self.value += 1
return self.value
def get_counter(self):
return self.value
ray.init(address='ray://host:port', runtime_env=runtime_env)
'''
first method is wrong
'''
ray_factor = ray.remote(self.cls, num_cpus=9)
'''
second method is also wrong
'''
ray_factor = ray.remote(self.cls)
ray_factor.options(num_cpus=9)
counter_actor = Counter.remote()
how can i make num_cpus work without annotation.
My ray version is 1.10.0