Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in starting worker thread in MultiTaskSampler #73

Open
Supriya0530 opened this issue Jun 3, 2024 · 0 comments
Open

Error in starting worker thread in MultiTaskSampler #73

Supriya0530 opened this issue Jun 3, 2024 · 0 comments

Comments

@Supriya0530
Copy link

Supriya0530 commented Jun 3, 2024

Hello,
I setup code from the main branch and I get the following error for all the Gym environments in the solution:
Traceback (most recent call last):
File "C:\RESEARCH\APPS\pytorch-maml-rl-master\train.py", line 135, in
main(args)
File "C:\RESEARCH\APPS\pytorch-maml-rl-master\train.py", line 64, in main
sampler = MultiTaskSampler(config['env-name'],
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\RESEARCH\APPS\pytorch-maml-rl-master\maml_rl\samplers\multi_task_sampler.py", line 108, in init
worker.start()
File "c:\Users\conne\anaconda3\envs\MAMLRL_ENV\Lib\multiprocessing\process.py", line 121, in start
self._popen = self._Popen(self)
^^^^^^^^^^^^^^^^^
File "c:\Users\conne\anaconda3\envs\MAMLRL_ENV\Lib\multiprocessing\context.py", line 224, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\Users\conne\anaconda3\envs\MAMLRL_ENV\Lib\multiprocessing\context.py", line 336, in _Popen
return Popen(process_obj)
^^^^^^^^^^^^^^^^^^
File "c:\Users\conne\anaconda3\envs\MAMLRL_ENV\Lib\multiprocessing\popen_spawn_win32.py", line 94, in init
reduction.dump(process_obj, to_child)
File "c:\Users\conne\anaconda3\envs\MAMLRL_ENV\Lib\multiprocessing\reduction.py", line 60, in dump
ForkingPickler(file, protocol).dump(obj)
AttributeError: Can't pickle local object 'make_env.._make_env'

It is coming in the line , worker.start() in the class, MultiTaskSampler(Sampler). I have setup Python ver. 3.11.7, Numpy ver. 1.26.4, Pytorch ver. 2.0.0 and Gym ver. 0.15.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant