-
Notifications
You must be signed in to change notification settings - Fork 2.2k
suppress error raise in #2258 #2305
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
Conversation
This is a temporary solution!!! Behavior: 1, The user supply start value is taken as priority (same as before the fix) 2, if there is transformed RV conditioned on another free_RV, the start value will be ignore (due to error in #2258) 3, No more error using default init in situation 2.
| if is_transformed_name(tname) and get_untransformed_name(tname) == name: | ||
| transform_func = [d.transformation for d in model.deterministics if d.name == name] | ||
| if transform_func: | ||
| b[tname] = transform_func[0].forward(a[name]).eval() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use tag.test_value instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wrong
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try it out please. I was confused by the shortcut pymc3.sampling above the codeblock and thought it is internals of sampling. Seems like it can be the right solution as it is executed once.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure I understand what you mean - if you find a solution you can push to this branch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the best solution is recompiled the graph using something like _compile_theano_function similar to distribution.draw_value. However, we always need to feed a dictwith the right input to the new compiled function as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @aseyboldt as he mention he might refactor _compile_theano_function for #2296
|
Close in favor of #2328 |
This is a temporary solution!!!
Related/same issue including: #2076, #2109
Behavior:
1, The user supplied start value is taken as priority (same as before the fix)
2, if there is transformed RV conditioned on another free_RV, the start value will be ignore (due to error in #2258)
3, No more error using default init in situation 2: