-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Closed
Description
i wrote a simple cython file which only has one actor with init function, build and setup it.
@ray.remote
class SelfPlayer(object):
def __init__(self):
os.environ["CUDA_VISIBLE_DEVICES"] = ",".join([str(i) for i in ray.get_gpu_ids()])
In another python file, i import that module and try to initialize the SelfPlayer with ray.remote
rewards = [selfplayers[i].do_selfplay.remote(args) for i in xrange(n_gpu)]
then i got the following error
Traceback (most recent call last):
File "policy/rlpolicy_train.py", line 218, in <module>
train(args)
File "policy/rlpolicy_train.py", line 57, in train
selfplayers = [SelfPlayer.remote() for _ in xrange(n_gpu)]
File "/usr/local/lib/python2.7/dist-packages/ray/actor.py", line 415, in remote
actor_object._manual_init(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/ray/actor.py", line 434, in _manual_init
signature.check_signature_supported(v, warn=True)
File "/usr/local/lib/python2.7/dist-packages/ray/signature.py", line 47, in check_signature_supported
in funcsigs.signature(func).parameters.items()]
File "/usr/local/lib/python2.7/dist-packages/funcsigs/__init__.py", line 62, in signature
sig = signature(obj.__func__)
File "/usr/local/lib/python2.7/dist-packages/funcsigs/__init__.py", line 187, in signature
raise ValueError('callable {0!r} is not supported by signature'.format(obj))
ValueError: callable <cyfunction SelfPlayer.__init__ at 0x7fb0c9ee1950> is not supported by signature
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels