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

RecursionError: maximum recursion depth exceeded #3

Closed
hakrrr opened this issue Apr 20, 2020 · 5 comments
Closed

RecursionError: maximum recursion depth exceeded #3

hakrrr opened this issue Apr 20, 2020 · 5 comments

Comments

@hakrrr
Copy link

hakrrr commented Apr 20, 2020

I'm trying to run the code locally with doodad but I encounter the above error. The Error log is as following:

File "/home/james/Documents/GitHub/leap/railrl/torch/pytorch_util.py", line 145, in fanin_init
return fanin_init(tensor.data)
[Previous line repeated 983 more times]
File "/home/james/Documents/GitHub/leap/railrl/torch/pytorch_util.py", line 144, in fanin_init
if isinstance(tensor, TorchVariable):
RecursionError: maximum recursion depth exceeded

Trying to increase the max depth doesn't help.

@hakrrr hakrrr changed the title No module named 'torch.multiprocessing' RecursionError: maximum recursion depth exceeded Apr 20, 2020
@snasiriany
Copy link
Owner

Hi James,

Thank you for your interest in our codebase. The issue is that you will need to create a python environment, with all of the necessary packages. To find these packages, please go to https://github.com/snasiriany/leap/blob/master/docker/Dockerfile

and search for all instances of pip install ...

and install all of the dependencies mentioned in those lines.

In general, the linked dockerfile should give be a guide for identifying any other missing dependencies.

@hakrrr
Copy link
Author

hakrrr commented Apr 20, 2020

Thank you Soroush for the quick response,

I have installed all of the files except:

This error occurs when I try to run stage 2 for the env pm:
python vae/train_vae.py --env pm
(I also checked the paths in config if they are correct, which they are I believe)

The other 2 environments fail at stage 1 with the error: ERROR: GLEW initalization error: Missing GL version.

Would be really cool if I could run it, the paper looks promising.

@snasiriany
Copy link
Owner

Hi James,

In general, I would recommend running things on the docker image, rather than locally. That said, I understand that it may be more convenient to run things locally, so I'll try to help out as best as I can :)

Re: pytorch. I don't think the code is compatible with pytorch 1.4.0. Could you elaborate on why your pc doesn't support 0.3.0? Perhaps, you can try the following command instead? pip install torch==0.3.0.post4. If that doesn't work, perhaps the following will work: pip install torch==0.3.1.

Re: GLEW. Does following the solution from this post help? openai/mujoco-py#187

@hakrrr
Copy link
Author

hakrrr commented Apr 28, 2020

Hi Soroush,
my apologies for the late reply.

Re: GLEW. Does following the solution from this post help? openai/mujoco-py#187

The GLEW issue was resolved, thanks!

However the initial problem still exists even with torch 0.3.1. Upon using pip install http://download.pytorch.org/whl/cu90/torch-0.3.0.post4-cp35-cp35m-linux_x86_64.whl the following error message:

ERROR: torch-0.3.0.post4-cp35-cp35m-linux_x86_64.whl is not a supported wheel on this platform.

Btw. I use Ubuntu 18.04 with cuda 10.2.
To elaborate more on the error: The function fanin_init(tensor) in pytorch_util.py (line 143) appears to call itself over and over exceeding the allowed system maximum for recursion depth.

@snasiriany
Copy link
Owner

So to elaborate, were you able to successfully install pytorch 0.3.1? If so, did you get this maximum recursion depth error with pytorch 0.3.1? If you are using torch 0.3, I'm not sure why the error exists. In that case, could you provide some more context around the issue (maybe a stack trace)?

If you're using a newer version (> 0.3.1) this error may be expected. There's no guarantee of the code working with a newer version of pytroch. If you need to use a newer version, this requires making modifications to the code so that it is compatible with the newer version of pytorch. While I can try my best to help you in this case, I think it's best to step through the code with a debugger/print statements to resolve all the issues that arise.

That said, you could always run experiments via the docker image. You should be able to successfully install pytorch 0.3 via the docker image, even though you have had some issues installing it on your local machine.

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

2 participants