Closed B0Gec closed 1 year ago
Could not recreate on master
or with 1.7.5
before you run model.fit()
, what is the value of warnings.filters
?
[
('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.
I am running this in linux terminal, i.e. [GCC 10.2.1 20210110].
Tried running on replit, still warning:
What exactly do you mean by running in REPL?
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.
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)