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

RuntimeError: maximum recursion depth exceeded #13

Open
vcuculo opened this issue Feb 6, 2018 · 1 comment
Open

RuntimeError: maximum recursion depth exceeded #13

vcuculo opened this issue Feb 6, 2018 · 1 comment

Comments

@vcuculo
Copy link
Contributor

vcuculo commented Feb 6, 2018

When creating a model that includes an ObservedMRDLayer and back_constraint enabled as mlp, it seems to get stuck in a recursive loop

File "build/bdist.linux-x86_64/egg/paramz/core/observable_array.py", line 125, in __ setslice __
File "build/bdist.linux-x86_64/egg/paramz/core/observable_array.py", line 119, in __ setitem __
File "build/bdist.linux-x86_64/egg/paramz/core/observable.py", line 91, in notify_observers
File "build/bdist.linux-x86_64/egg/paramz/core/parameter_core.py", line 510, in _pass_through_notify_observers
File "build/bdist.linux-x86_64/egg/paramz/core/observable.py", line 91, in notify_observers
File "build/bdist.linux-x86_64/egg/paramz/core/parameter_core.py", line 510, in _pass_through_notify_observers
File "build/bdist.linux-x86_64/egg/paramz/core/observable.py", line 91, in notify_observers
File "build/bdist.linux-x86_64/egg/paramz/core/parameter_core.py", line 508, in _parameters_changed_notification
File "build/bdist.linux-x86_64/egg/deepgp/layers/mrd.py", line 193, in parameters_changed
File "build/bdist.linux-x86_64/egg/deepgp/layers/mrd.py", line 143, in _aggregate_qX
File "build/bdist.linux-x86_64/egg/paramz/core/observable_array.py", line 125, in __ setslice __
File "build/bdist.linux-x86_64/egg/paramz/core/observable_array.py", line 118, in __ setitem __
File "build/bdist.linux-x86_64/egg/paramz/param.py", line 158, in __ getitem __
RuntimeError: maximum recursion depth exceeded in __ instancecheck __

Full log here

@vcuculo
Copy link
Contributor Author

vcuculo commented Feb 7, 2018

This seems to happen in the _aggregate_qX() function that in case of back_constraint=true tries several assignments to the variable X, including the following line:

self.X.mean[:] = 0

but since X is an Observable array, it triggers the call to parameters_changed() function, that includes a call to _aggregate_qX() and so on...

@adamian any hint?

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