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

Even faster tests 🚬 #393

Merged
merged 10 commits into from
Aug 22, 2023
Merged

Even faster tests 🚬 #393

merged 10 commits into from
Aug 22, 2023

Conversation

Jacob-Stevens-Haas
Copy link
Collaborator

@Jacob-Stevens-Haas Jacob-Stevens-Haas commented Aug 15, 2023

Took the 🔬 to the slowest tests of StableLinearSR3 and TrappingSR3. Since test parameterization affected only the creation of CVXPY functions, I refactored that part out to speed up tests.

This drops test time from around 45 sec to 30 14 sec

Closes #320

@akaptano, if you get a chance to review, that would be great, since this mostly affects your code.
Edit: @znicolaou, I made all the changes to Weak/PDE library tests here too.

It causes check_is_fitted to fail, since that function uses the presence of
underscored attributes as a proxy for the model having been fit.

Also: promote the TrappingSR3 non-quadratic warning to a warning, not a print
statement.
Also extracted relevant parts of test_trapping_inequality_constraints
Also extracted relevant parts of test_stable_linear_sr3_linear_library
@codecov
Copy link

codecov bot commented Aug 15, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.02% ⚠️

Comparison is base (ec8b34c) 93.76% compared to head (652c219) 93.74%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #393      +/-   ##
==========================================
- Coverage   93.76%   93.74%   -0.02%     
==========================================
  Files          37       37              
  Lines        3590     3583       -7     
==========================================
- Hits         3366     3359       -7     
  Misses        224      224              
Files Changed Coverage Δ
pysindy/optimizers/stable_linear_sr3.py 85.40% <100.00%> (-0.93%) ⬇️
pysindy/optimizers/trapping_sr3.py 89.80% <100.00%> (-0.16%) ⬇️

... and 1 file with indirect coverage changes

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

Coarsen grid
loosen integration tolerances
loosen test tolerances.
Tweak test parameters
@Jacob-Stevens-Haas Jacob-Stevens-Haas merged commit b524bda into master Aug 22, 2023
5 of 6 checks passed
@Jacob-Stevens-Haas Jacob-Stevens-Haas deleted the faster-tests branch August 22, 2023 19:05
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.

Break apart & speed up integration tests.
1 participant