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

CI: Fix time errors on windows and numpy warnings #645

Merged
merged 5 commits into from
Nov 3, 2022

Conversation

Smit-create
Copy link
Member

@Smit-create Smit-create commented Nov 2, 2022

Fixes #633
Fixes #647

@coveralls
Copy link

coveralls commented Nov 2, 2022

Coverage Status

Coverage increased (+0.03%) to 95.044% when pulling 4d6b4d2 on Smit-create:i633 into 89a7012 on QuantEcon:master.

@Smit-create
Copy link
Member Author

Smit-create commented Nov 2, 2022

I think pytest is slower on windows and so the results differ much on it. We can set a higher rtol for windows and lower for the other two. prjemian/punx#167

@Smit-create Smit-create changed the title CI: Fix time errors on windows CI: Fix time errors on windows and numpy warnings Nov 2, 2022
Copy link
Member

@oyamad oyamad left a comment

Choose a reason for hiding this comment

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

I vote for setting a higher `rtol' for all platforms (not skipping on particular platforms).

Copy link
Member

@oyamad oyamad left a comment

Choose a reason for hiding this comment

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

Can we remove these parts?

if platform == 'darwin':
# skip for darwin
return
if platform == 'darwin':
# skip for darwin
return

@Smit-create
Copy link
Member Author

Can we remove these parts?

if platform == 'darwin':
# skip for darwin
return

if platform == 'darwin':
# skip for darwin
return

That issue with osx is still not fixed. I tried enabling that and found these results: https://github.com/QuantEcon/QuantEcon.py/actions/runs/3374887986/jobs/5600990154:

----------------------------- Captured stdout call -----------------------------
TAC: Elapsed: 0:00:0.11
TAC: Elapsed: 0:00:0.19
TOC: Elapsed: 0:00:0.48

While the expected values are 0.1, 0.1, and 0.3. See the relevant discussion here: #448.

Locally, this passes for me on MAC M1 but not sure why that fails on the CI.

@oyamad
Copy link
Member

oyamad commented Nov 3, 2022

Just raise rtol, say to 0.3, so that the tests pass? I think it is enough to test that the code itself runs without an error. We do not know what value to "expect" for time.sleep(self.h) + overhead time.

@Smit-create
Copy link
Member Author

Just raise rtol, say to 0.3, so that the tests pass?

I tried to raise that and still, there seems to be a large difference.

=========================== short test summary info ============================
FAILED quantecon/util/tests/test_timing.py::TestTicTacToc::test_timer - AssertionError: 
Not equal to tolerance rtol=0.5, atol=0.05

Mismatched elements: 1 / 1 (100%)
Max absolute difference: 0.10293403
Max relative difference: 1.02934027
 x: array(0.202934)
 y: array(0.1)
============ 1 failed, 469 passed, 64 warnings in 472.82s (0:07:52) ============

@oyamad
Copy link
Member

oyamad commented Nov 3, 2022

Then let rtol = 2 for example?

Copy link
Member

@oyamad oyamad left a comment

Choose a reason for hiding this comment

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

@Smit-create Great, thanks!

@Smit-create Smit-create merged commit 31a1bf8 into QuantEcon:master Nov 3, 2022
@Smit-create Smit-create deleted the i633 branch November 3, 2022 14:06
@IanMichaelHarper
Copy link

I think pytest is slower on windows and so the results differ much on it. We can set a higher rtol for windows and lower for the other two. prjemian/punx#167

Is there a reason it's slower and can it be fixed?

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.

CI: NumPy warnings TST: Test failure on windows CI
4 participants