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

[NEW FEATURE] add a way to silence import warning errors #232

Open
1 of 2 tasks
mathurinm opened this issue May 12, 2022 · 1 comment
Open
1 of 2 tasks

[NEW FEATURE] add a way to silence import warning errors #232

mathurinm opened this issue May 12, 2022 · 1 comment

Comments

@mathurinm
Copy link

Is your feature request related to a problem? Please describe.
I don't have astropy installed and don't plan on installing it: I get a lot of "WARNING: astropy not found, will default to scipy for convolution" that I'd like to silence when I run benchopt.

Describe the solution you'd like
If the warning was of a specific class I could ignore it, or there could be a way to globally configure modopt warning level ?

Are you planning to submit a Pull Request?

  • Yes
  • No
@paquiteau
Copy link
Contributor

as for #226 you can do it on your end, using warnings.filterwarnings('ignore', module='modopt') will remove all warnings of the Modopt module. More granularity for the filter is describe here: https://docs.python.org/3/library/warnings.html#warnings.filterwarnings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants