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

Can this code run in win10 ? #41

Open
wang88256187 opened this issue Mar 22, 2020 · 3 comments
Open

Can this code run in win10 ? #41

wang88256187 opened this issue Mar 22, 2020 · 3 comments

Comments

@wang88256187
Copy link

I find you have update your code recently. Your work is very amazing to me, I really thank you very much. But I also find that your code can't run in win10 but can run in linux.

@cxw-droid
Copy link

I have the same question. When I run the train.py, I got the following error message:
(YYY) XXX\pytorch-maml-rl>python train.py --config configs/maml/halfcheetah-vel.yaml --output-folder maml-halfcheetah-vel --seed 1 --num-workers 8

C:\XXX\envs\xxx\lib\site-packages\gym-0.17.1-py3.7.egg\gym\logger.py:30: UserWarning: WARN: Box bound precision lowered by casting to float32
warnings.warn(colorize('%s: %s'%('WARN', msg % args), 'yellow'))
Traceback (most recent call last):
File "train.py", line 118, in
main(args)
File "train.py", line 54, in main
num_workers=args.num_workers)
File "XXX\pytorch-maml-rl\maml_rl\samplers\multi_task_sampler.py", line 107, in init
worker.start()
File "C:\XXX\envs\xxx\lib\multiprocessing\process.py", line 112, in start
self._popen = self._Popen(self)
File "C:\XXX\envs\xxx\lib\multiprocessing\context.py", line 223, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "C:\XXX\envs\xxx\lib\multiprocessing\context.py", line 322, in _Popen
return Popen(process_obj)
File "C:\XXX\envs\xxx\lib\multiprocessing\popen_spawn_win32.py", line 89, in init
reduction.dump(process_obj, to_child)
File "C:\XXX\envs\xxx\lib\multiprocessing\reduction.py", line 60, in dump
ForkingPickler(file, protocol).dump(obj)
AttributeError: Can't pickle local object 'make_env.._make_env'

(YYY) XXX\pytorch-maml-rl>Traceback (most recent call last):
File "", line 1, in
File "C:\XXX\envs\xxx\lib\multiprocessing\spawn.py", line 105, in spawn_main
exitcode = _main(fd)
File "C:\XXX\envs\xxx\lib\multiprocessing\spawn.py", line 115, in _main
self = reduction.pickle.load(from_parent)
EOFError: Ran out of input

(YYY) XXX\pytorch-maml-rl>python train.py --config configs/maml/halfcheetah-vel.yaml --output-folder maml-halfcheetah-vel --seed 1 --num-workers 1
C:\XXX\envs\xxx\lib\site-packages\gym-0.17.1-py3.7.egg\gym\logger.py:30: UserWarning: WARN: Box bound precision lowered by casting to float32
warnings.warn(colorize('%s: %s'%('WARN', msg % args), 'yellow'))
Traceback (most recent call last):
File "train.py", line 118, in
main(args)
File "train.py", line 54, in main
num_workers=args.num_workers)
File "XXX\pytorch-maml-rl\maml_rl\samplers\multi_task_sampler.py", line 107, in init
worker.start()
File "C:\XXX\envs\xxx\lib\multiprocessing\process.py", line 112, in start
self._popen = self._Popen(self)
File "C:\XXX\envs\xxx\lib\multiprocessing\context.py", line 223, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "C:\XXX\envs\xxx\lib\multiprocessing\context.py", line 322, in _Popen
return Popen(process_obj)
File "C:\XXX\envs\xxx\lib\multiprocessing\popen_spawn_win32.py", line 89, in init
reduction.dump(process_obj, to_child)
File "C:\XXX\envs\xxx\lib\multiprocessing\reduction.py", line 60, in dump
ForkingPickler(file, protocol).dump(obj)
AttributeError: Can't pickle local object 'make_env.._make_env'
(YYY) XXX\pytorch-maml-rl>Traceback (most recent call last):
File "", line 1, in
File "C:\XXX\envs\xxx\lib\multiprocessing\spawn.py", line 105, in spawn_main
exitcode = _main(fd)
File "C:\XXX\envs\xxx\lib\multiprocessing\spawn.py", line 115, in _main
self = reduction.pickle.load(from_parent)
EOFError: Ran out of input

@tristandeleu
Copy link
Owner

Hi, sorry for the late reply. I haven't tested the code on Windows 10, I've only tested it on Ubuntu and MacOS. It looks like this is an issue with the default context used for multiprocessing in Windows 10 being different from Unix, but I don't know enough about that to be 100% sure. I have unfortunately no way of testing it myself, so any help is welcome for this issue.

@yaoxunji
Copy link

yaoxunji commented Sep 8, 2020

I have the same question, did this question solved?

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

4 participants