Skip to content

Clean up some warnings from the test suite #6067

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

Merged
merged 1 commit into from
Aug 26, 2022

Conversation

Armavica
Copy link
Member

@Armavica Armavica commented Aug 26, 2022

What is this PR about?

This PR removes 200 warnings from the 678 generated by the test suite. This de-clutters the output of the tests and makes it easier to spot if something is wrong. Also, but I am not sure if this is significant, the whole test suite ran 10% faster on my computer after the cleanup. I will check if it also makes the github runners faster.

I think that the ones that I fixed are the less controversial ones.

A good proportion if not the majority of the remaining warnings comes from a numpy deprecation in aesara which I will also address.

The rest are less easy to fix, or potential legit indications of problems (when I was not sure, I left them alone).

If there is interest, I can make a second pass later and try to tackle the rest.

I can breakup this huge commit into smaller thematic ones, let me know if this would be easier to review.

Checklist

Major / Breaking Changes

  • ...

Bugfixes / New features

  • ...

Docs / Maintenance

  • Clean up some warnings generated by the test suite

@codecov
Copy link

codecov bot commented Aug 26, 2022

Codecov Report

Merging #6067 (75aa269) into main (093a734) will decrease coverage by 0.04%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #6067      +/-   ##
==========================================
- Coverage   89.56%   89.52%   -0.05%     
==========================================
  Files          72       72              
  Lines       12941    12942       +1     
==========================================
- Hits        11591    11586       -5     
- Misses       1350     1356       +6     
Impacted Files Coverage Δ
pymc/tuning/starting.py 92.50% <100.00%> (+0.06%) ⬆️
pymc/step_methods/hmc/base_hmc.py 89.76% <0.00%> (-0.79%) ⬇️
pymc/distributions/timeseries.py 77.99% <0.00%> (-0.65%) ⬇️
pymc/sampling.py 82.15% <0.00%> (-0.34%) ⬇️
pymc/gp/gp.py 93.18% <0.00%> (ø)
pymc/distributions/discrete.py 99.21% <0.00%> (ø)

@Armavica
Copy link
Member Author

I am not sure why this test is failing on the runner, as it is passing on my computer.

@Armavica Armavica changed the title Remove some warnings from the test suite Clean up some warnings from the test suite Aug 26, 2022
@canyon289
Copy link
Member

Thank you for the PR. Its because this one test is too sensitive. Feel free to double the relative tolerance to make it less flaky

image

@Armavica
Copy link
Member Author

I see. Shouldn't that better be fixed by fixing the PRNG seed?

Copy link
Member

@ricardoV94 ricardoV94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is amazing. There are just some cases where I think we should assert the warning is being issued instead of ignoring it.

@ricardoV94
Copy link
Member

I see. Shouldn't that better be fixed by fixing the PRNG seed?

I never saw this test fail so I think it's safe to just ignore and rerun.

@ricardoV94
Copy link
Member

Opened an issue for the failing test: #6069

@Armavica
Copy link
Member Author

Thank you for your review! I pushed the requested changes.

@Armavica Armavica marked this pull request as ready for review August 26, 2022 07:00
@ricardoV94 ricardoV94 merged commit 9822ce5 into pymc-devs:main Aug 26, 2022
@Armavica Armavica deleted the tests-warnings branch August 26, 2022 07:27
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