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 stacklevel to warnings #1271

Merged
merged 1 commit into from
Jan 1, 2022

Conversation

MarcoGorelli
Copy link
Contributor

xref #1269 (comment)

This is so that warnings reference the line in the user's code where the warning is emitted, rather than the line of code internal to NumPyro (this way users know what they need to change)

@MarcoGorelli MarcoGorelli force-pushed the add-stacklevel-to-warnings branch from 4731ad3 to 0b316d4 Compare January 1, 2022 22:00
Copy link
Member

@fehiepsi fehiepsi left a comment

Choose a reason for hiding this comment

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

I'm not sure what's the common practice here but the changes look good to me - it seems to be better to raise the warning at the user-level code. Thanks, @MarcoGorelli!

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

Successfully merging this pull request may close these issues.

2 participants