-
Notifications
You must be signed in to change notification settings - Fork 561
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
Skip the warning in gpytorch.lazy.__getattr__
if name starts with _
#2423
Conversation
Summary: Updates some code & tests that lead to deprecation & other warnings. See also cornellius-gp/gpytorch#2423 Differential Revision: D50384526
Hm, this seems like a very roundabout way of preventing this warning from being raised in an Or maybe the warning should be somewhere else? Perhaps in |
Summary: Updates some code & tests that lead to deprecation & other warnings. See also cornellius-gp/gpytorch#2423 Reviewed By: esantorella Differential Revision: D50384526
I left this check intentionally general since there may be other uses of
Yeah, that could work. It is a bit of a trade-off between raising the warning at import vs instantiation time. Assuming interactive development: import time warning says "don't use this thing" before you start using it; instantiation time warning says "go back and change this to the correct class", which is a bit more work. These have been deprecated for over a year by now, so the right move might be to reap them altogether. |
Summary: Updates some code & tests that lead to deprecation & other warnings. See also cornellius-gp/gpytorch#2423 Reviewed By: esantorella Differential Revision: D50384526
Summary: Updates some code & tests that lead to deprecation & other warnings. See also cornellius-gp/gpytorch#2423 Reviewed By: esantorella Differential Revision: D50384526
Summary: Updates some code & tests that lead to deprecation & other warnings. See also cornellius-gp/gpytorch#2423 Reviewed By: esantorella Differential Revision: D50384526
Summary: Updates some code & tests that lead to deprecation & other warnings. See also cornellius-gp/gpytorch#2423 Reviewed By: esantorella Differential Revision: D50384526
Summary: Pull Request resolved: #2049 Updates some code & tests that lead to deprecation & other warnings. See also cornellius-gp/gpytorch#2423 Reviewed By: esantorella Differential Revision: D50384526 fbshipit-source-id: ad40950c0e92996df3c0bf7ad4db79001e04cebf
It'd be nice to get rid of the lazies and this special handling - cc @gpleiss |
Should we land this and follow up with full deprecation later? |
Oops sorry for the slow reply. I think it makes sense to land this, and then we can go with full deprecation later. In general, we should do a deprecation sweep and actually get rid of all of the things marked as deprecated. I think everything marked has deprecated has been deprecated for over a year at least. |
The current setup leads to the unittest
self.assertWarns...
to wrongly trigger a warning when entering_AssertWarnsContext
(callsgetattr
on all modules: /~https://github.com/python/cpython/blob/main/Lib/unittest/case.py#L292-L294). Filtering out based on name starting with_
eliminates the needless warning and keeps the correct behavior.