-
Notifications
You must be signed in to change notification settings - Fork 280
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 in comparison #57
Comments
That's interesting... |
I have a similar usecase - I'm getting this error too. Maybe our models are too big to be visualised?
Is this a known issue with large/complicated models? I can create a reproducible example if not |
Hi, It is not very common to have big enough models for this to happen no. |
Hi @albanD. It's not a blocker (though a nice to have!). I'm not sure it's worth the effort of doing that for what seems to be 3 people. However if you have any hints on why this might happen then it could be useful. The model I'm running this on has 3 full BERT-base encoders within it |
My guess, based on the stack you shared, is just that the graph we're trying to build has too much depth. And because we use recursion every time to get to the next Node, the stack end up being pretty deep. In your case almost 1000 deep and python doesn't like that. That's why the proposed fix was to limit the recursion depth by using iterative algorithms instead here. |
You increase the recursion depth by doing the following(change the depth as per your need):
But the |
I have a loss function and I'm trying to make a graph visualization on the calculation of the loss:
I see this output:
Python 3.7. torch 1.7.7. torchviz 0.0.2.
Do you have any thoughts on what might be causing this? If it's a blackbox I can try to make a minimal reproducing example.
The text was updated successfully, but these errors were encountered: