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

Add type assertion for model_args and model_kwargs of render_model #3083

Merged
merged 3 commits into from
May 7, 2022

Conversation

dilaragokay
Copy link
Contributor

If a model contains only one parameter, then a user might attempt to pass an argument that is not a tuple. In that case, the user is likely to get an error message which does not point out the exact reason (see #3082). Therefore, adding this assertion would help them pinpoint the reason faster.

fritzo
fritzo previously approved these changes May 5, 2022
Copy link
Member

@fritzo fritzo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks this is great! WDYT of adding an assertion for model_kwargs as well?

@dilaragokay dilaragokay changed the title Add type assertion for model_args of render_model Add type assertion for model_args and model_kwargs of render_model May 5, 2022
@fritzo fritzo merged commit 87699e1 into pyro-ppl:dev May 7, 2022
@dilaragokay dilaragokay deleted the patch-1 branch May 7, 2022 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants