-
Notifications
You must be signed in to change notification settings - Fork 308
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
[BUG] UserWarnings cannot be suppressed #364
Comments
Could not recreate on before you run |
[
('ignore', None, <class 'Warning'>, None, 0),
('ignore', None, <class 'UserWarning'>, None, 0),
('always', None, <class 'scipy.special._sf_error.SpecialFunctionWarning'>, None, 0),
('ignore', re.compile('the matrix subclass is not the recommended way', re.IGNORECASE), <class 'Warning'>, None, 0),
('ignore', re.compile('numpy.ndarray size changed', re.IGNORECASE), <class 'Warning'>, None, 0),
('ignore', re.compile('numpy.ufunc size changed', re.IGNORECASE), <class 'Warning'>, None, 0),
('ignore', re.compile('numpy.dtype size changed', re.IGNORECASE), <class 'Warning'>, None, 0),
('always', None, <class 'numpy.RankWarning'>, None, 0), ('default', None, <class 'DeprecationWarning'>, '__main__', 0),
('ignore', None, <class 'DeprecationWarning'>, None, 0), ('ignore', None, <class 'PendingDeprecationWarning'>, None, 0),
('ignore', None, <class 'ImportWarning'>, None, 0), ('ignore', None, <class 'ResourceWarning'>, None, 0),
('ignore', None, <class 'pkg_resources.PEP440Warning'>, None, 0)
] |
Huh. Are you using Ipython? If so, try running the code in the REPL and let me know if you still see the warning. |
REPL = Read, Eval, Print Loop, aka running it in the terminal. I see where the issue is. This is fixed in #347, which will be in the next release. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
when ignoring warnings with
nothing happens, warnings are still displayed.
This can clutter the output logs when running large scale experiments.
Reproducing code example using default tutorial notebook:
Error message:
It still prints out warning:
/home/pysindy/Documents/py-envs/venv/lib/python3.9/site-packages/pysindy/optimizers/stlsq.py:191: UserWarning: Sparsity parameter is too big (10.01) and eliminated all coefficients
warnings.warn(
PySINDy/Python version information:
1.7.5 3.9.2 (default, Feb 28 2021, 17:03:44)
The text was updated successfully, but these errors were encountered: