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 option to squash UserWarning about double derivatives #147

Closed
sirmarcel opened this issue Sep 2, 2024 · 7 comments
Closed

Add option to squash UserWarning about double derivatives #147

sirmarcel opened this issue Sep 2, 2024 · 7 comments
Labels
wontfix This will not be worked on

Comments

@sirmarcel
Copy link

Hello, it seems that #141 added a warning on initialisation about issues with second derivatives. Is it possible to disable this warning, or at least only issue it when the second derivatives are called? It's not a huge issue, but I'm not a big fan of unnecessary entries in my log files.

@ceriottm
Copy link
Contributor

ceriottm commented Sep 2, 2024

This should be triggered only once, and it's actually kind of important as it can lead to silent failures down the line. You can disable it with the usual mechanism you mute warnings, but was discussed at length between @Luthaf and @frostedoyster and I thing this was the least evil. Don't ask me why it can't be triggered when second derivatives are computed, but I think it's a torch limitation (?).

@sirmarcel
Copy link
Author

Silent failure is indeed bad, is there any reason to not just return nan in this case? Seems like silently returning something that is a number is a bit of a foot gun, as they say.

@frostedoyster
Copy link
Collaborator

Perhaps we could make the switch to torch.compile, which should solve these issues. IDK if that would integrate well with our software stack @Luthaf

@frostedoyster
Copy link
Collaborator

I agree that, as an easier fix, we can have a warn argument (true by default)

@sirmarcel
Copy link
Author

I don't think it's worth adding an argument tbh, I'll just live with it.

@sirmarcel
Copy link
Author

Alright, I think this is a clear wontfix, I'm closing this.

@ceriottm
Copy link
Contributor

ceriottm commented Sep 2, 2024 via email

@ceriottm ceriottm added the wontfix This will not be worked on label Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants