-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Don't set compute_test_value to raise #566
Comments
If I understand you correctly, you're saying that test_value should not be changed after creating the theano op. For a little while I thought we should instead have the current point in |
Oh I see, this is related to #561. |
The reason I set 'raise' was to avoid silent and mysterious failures when data arrays don't line up. The problem is that if we don't set raise, we only get an error when we try to sample. Since the likelihood may be quite complicated, it will be difficult to figure out where this error is coming from. Is there a way we can set 'raise' only temporarily? Perhaps within @twiecki how come you want to store the point within Model? |
With the dev version, now there is a decorator that allow you to do so:
|
Oh cool. Its a function decorator that changes it for the duration of the function? It would be really nice to have a function that returns the old config values, modifying the current one. And a function that applies the old context. PyMC uses |
That is a good idea. I won't have time shortly for this. If you do it, can
|
Sure. On Tue, May 26, 2015 at 5:20 AM, Frédéric Bastien notifications@github.com
|
@nouiz did this get implemented by any chance? |
There is this decorator that change a value of a flag: @theano.configparser.change_flags(compute_test_value='off') On Mon, Jul 18, 2016 at 9:31 AM, Thomas Wiecki notifications@github.com
|
Right, ideally it could used as a function call though because we're using a context manager and not a function that can be decorated. |
Go see in theano/configparser.py. You probably change change the On Mon, Jul 18, 2016 at 9:51 AM, Thomas Wiecki notifications@github.com
|
In this Theano issue, a user got problem, as pymc set compute_test_value to raise by default.
The problem is that there is one pymc op compiled. So when Theano load its cache, it load pymc, that change Theano compute_test_value, even if the user didn't load pymc itself:
Theano/Theano#1951 (comment)
It is not yet documented, but Theano now give much better error message for shape error. Here is an example:
Check, I print the backtrave when the node was created. So the user know when the node was created without using test value! This isn't in the released version of Theano.
I would suggest you to don't change theano default value for compute_test_value and if people ask questions about shape error, tell them about this. If you don't like this, I would recommand to at least change compute_test_value to "warn" instead of "raise".
The text was updated successfully, but these errors were encountered: