learnables / learn2learn

A PyTorch Library for Meta-learning Research
http://learn2learn.net
MIT License
2.66k stars 353 forks source link

maml_trpo example reports errors #351

Closed Lxsogo closed 2 years ago

Lxsogo commented 2 years ago

When I run this example on Windows 10, the following error occurs:

E:\Anaconda3\envs\meta\lib\site-packages\gym\spaces\box.py:73: UserWarning: WARN: Box bound precision lowered by casting to float32 logger.warn( Traceback (most recent call last): File "", line 1, in Traceback (most recent call last): File "E:\Anaconda3\envs\meta\lib\multiprocessing\connection.py", line 317, in _recv_bytes File "E:\Anaconda3\envs\meta\lib\multiprocessing\spawn.py", line 116, in spawn_main nread, err = ov.GetOverlappedResult(True) BrokenPipeError: [WinError 109] 管道已结束。

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "D:\Desktop\meta-learning\learn2learn\learn2learn-master\examples\rl\maml_trpo.py", line 223, in exitcode = _main(fd, parent_sentinel) File "E:\Anaconda3\envs\meta\lib\multiprocessing\spawn.py", line 126, in _main self = reduction.pickle.load(from_parent) File "E:\Anaconda3\envs\meta\lib\site-packages\cherry\envs\base.py", line 56, in getattr main() File "D:\Desktop\meta-learning\learn2learn\learn2learn-master\examples\rl\maml_trpo.py", line 138, in main return getattr(self.env, attr) File "E:\Anaconda3\envs\meta\lib\site-packages\cherry\envs\base.py", line 56, in getattr env = l2l.gym.AsyncVectorEnv([makeenv for in range(num_workers)]) File "E:\Anaconda3\envs\meta\lib\site-packages\learn2learn\gym\async_vec_env.py", line 25, in init return getattr(self.env, attr) File "E:\Anaconda3\envs\meta\lib\site-packages\cherry\envs\base.py", line 56, in getattr super(AsyncVectorEnv, self).init(env_fns, queue=self.queue) File "E:\Anaconda3\envs\meta\lib\site-packages\learn2learn\gym\envs\subproc_vec_env.py", line 73, in init return getattr(self.env, attr) observation_space, action_space = self.remotes[0].recv() [Previous line repeated 992 more times] File "E:\Anaconda3\envs\meta\lib\multiprocessing\connection.py", line 255, in recv File "E:\Anaconda3\envs\meta\lib\site-packages\cherry\envs\base.py", line 53, in getattr buf = self._recv_bytes() File "E:\Anaconda3\envs\meta\lib\multiprocessing\connection.py", line 326, in _recv_bytes raise EOFError EOFError

I don't know if it's the windows 10 system

tsinghuazl22 commented 2 years ago

I also meet with this problem, have you solved it yet?

seba-1511 commented 2 years ago

There's no guarantee that learn2learn works on Windows (because I don't have a machine to test Cython compilation).