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

Workaround to suppress (some) import warnings from NumPy #5956

Merged
merged 1 commit into from
Jul 7, 2022

Conversation

michaelosthege
Copy link
Member

What is this PR about?
Suppressing at least some of the annoying print output that appears on import.

This copies the changes from aesara-devs/aesara#980 which got delayed.

Some print output looking like gcc -v, but I narrowed that down to a NumPy issue: numpy/numpy#21942

Checklist

  • Explain important implementation details 👆
  • Make sure that the pre-commit linting/style checks pass.
  • Link relevant issues (preferably in nice commit messages)
  • Are the changes covered by tests and docstrings? Executed in all tests; manually validated that it works.
  • Fill out the short summary sections 👇

Major / Breaking Changes

None

Bugfixes / New features

  • Reduces the amount of uninformative/annoying print output upon import.

Docs / Maintenance

None

@michaelosthege michaelosthege changed the title Workaround to supporess (some) import warnings from NumPy Workaround to suppress (some) import warnings from NumPy Jul 7, 2022
@michaelosthege michaelosthege force-pushed the suppress-numpy-warnings branch from d9baa82 to 72ff4fe Compare July 7, 2022 09:26
@codecov
Copy link

codecov bot commented Jul 7, 2022

Codecov Report

Merging #5956 (72ff4fe) into main (7fe5164) will decrease coverage by 0.12%.
The diff coverage is 14.28%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #5956      +/-   ##
==========================================
- Coverage   89.54%   89.42%   -0.13%     
==========================================
  Files          73       73              
  Lines       13273    13292      +19     
==========================================
+ Hits        11885    11886       +1     
- Misses       1388     1406      +18     
Impacted Files Coverage Δ
pymc/__init__.py 68.42% <14.28%> (-31.58%) ⬇️

@maresb
Copy link
Contributor

maresb commented Jul 7, 2022

👍 Looks great to me, thanks @michaelosthege!

@michaelosthege
Copy link
Member Author

Codecov complains about the diff not being covered, but in fact that code ran in the Windows jobs of the CI pipeline: https://github.com/pymc-devs/pymc/runs/7230576493?check_suite_focus=true#step:7:126

Maybe it's just not collecting coverage from Windows jobs??

In any case, I think this is not within the scope of this PR and we can just ignore the codecov complaint.

@michaelosthege michaelosthege requested a review from twiecki July 7, 2022 10:56
@maresb
Copy link
Contributor

maresb commented Jul 7, 2022

That does seem strange! To spell it out explicitly, there is a contradiction between the coverage report, which says line 44 of pymc/__init__.py didn't run:

image

and the Azure logs which report a deprecation warning on line 44:

image

@twiecki
Copy link
Member

twiecki commented Jul 7, 2022

@maresb codecov is finicky.

@twiecki twiecki merged commit 294ff4a into pymc-devs:main Jul 7, 2022
@michaelosthege michaelosthege deleted the suppress-numpy-warnings branch July 7, 2022 13:17
maresb added a commit to maresb/pymc-feedstock that referenced this pull request Jul 7, 2022
@maresb maresb mentioned this pull request Aug 3, 2022
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants