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

Remove time check from Jax tests to improve stability #3963

Merged
merged 2 commits into from
Apr 4, 2024

Conversation

kratman
Copy link
Contributor

@kratman kratman commented Apr 3, 2024

Description

Jax tests checked runtime, which is inconsistent in the CI suite. This should keep the same coverage, but stop checking the runtime. Note: the changelog is also updated since that was missed in #3961

Fixes #3925

Type of change

Only test code.

  • Bug fix (non-breaking change which fixes an issue)

Key checklist:

  • No style issues: $ pre-commit run (or $ nox -s pre-commit) (see CONTRIBUTING.md for how to set this up to run automatically when committing locally, in just two lines of code)
  • All tests pass: $ python run-tests.py --all (or $ nox -s tests)
  • The documentation builds: $ python run-tests.py --doctest (or $ nox -s doctests)

You can run integration tests, unit tests, and doctests together at once, using $ python run-tests.py --quick (or $ nox -s quick).

Further checks:

  • Code is commented, particularly in hard-to-understand areas
  • Tests added that prove fix is effective or that feature works

@kratman kratman self-assigned this Apr 3, 2024
Copy link

codecov bot commented Apr 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.57%. Comparing base (78b7d25) to head (ba124aa).
Report is 4 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3963      +/-   ##
===========================================
- Coverage    99.58%   99.57%   -0.02%     
===========================================
  Files          257      257              
  Lines        21196    21198       +2     
===========================================
- Hits         21108    21107       -1     
- Misses          88       91       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kratman
Copy link
Contributor Author

kratman commented Apr 3, 2024

I don't see anywhere that the operator usage should have changed, so I think that coverage is outdated

@valentinsulzer
Copy link
Member

Are these tests actually failing, or is this a "we shouldn't test times in CI"? They do test real functionality, if they are failing that indicates there may be a bug

cc @martinjrobins

@kratman
Copy link
Contributor Author

kratman commented Apr 3, 2024

Both

  1. Time checks are not great because multiple jobs run on the same server.
  2. They do end up failing randomly. Re-triggering makes them pass. This got worse since we switched to pytest

@agriyakhetarpal
Copy link
Member

I think the failures are macOS-specific, because these tests are failing in CI but only for macOS and I have never seen them fail on Ubuntu or Windows. These take a really long time to complete on my local macOS machine too (#3948) and fail quite erratically. It makes me wonder if something is amiss upstream or a memory leak of some kind

@kratman
Copy link
Contributor Author

kratman commented Apr 3, 2024

Yeah I intend to keep looking into the Jax stuff, so I will try to find out if there is more going on

Copy link
Member

@valentinsulzer valentinsulzer left a comment

Choose a reason for hiding this comment

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

Got it. Removing makes sense in that case

@kratman kratman merged commit 8512040 into pybamm-team:develop Apr 4, 2024
39 of 40 checks passed
@agriyakhetarpal agriyakhetarpal deleted the fix/jaxTests branch April 4, 2024 09:56
js1tr3 pushed a commit to js1tr3/PyBaMM that referenced this pull request Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flaky JAX test cases
3 participants