-
Notifications
You must be signed in to change notification settings - Fork 262
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
[BE] Add smoke test for [escn,gemnet,equiformer_v2] train+predict, Add optimization test for [escn,gemnet,equiformer_v2] #640
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #640 +/- ##
==========================================
+ Coverage 57.27% 62.29% +5.01%
==========================================
Files 109 109
Lines 10316 10316
==========================================
+ Hits 5909 6426 +517
+ Misses 4407 3890 -517 ☔ View full report in Codecov by Sentry. |
Documenting our chat offline:
|
I removed the pickle dataset, and used @r-barnes commit to use the tutorial dataset.
Added tests for eqv2 and gemnet
Added test for predict mode (alongside the existing train mode test) |
tests/e2e/test_s2ef.py
Outdated
[ | ||
pytest.param("gemnet", 0.4, 0.06, id="gemnet"), | ||
pytest.param("escn", 0.4, 0.06, id="escn"), | ||
pytest.param("equiformer_v2", 0.4, 0.06, id="equiformer_v2"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you use a syrupy snapshot here instead of hardcoding the expected energy and force mae?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Training is not reproducible to a reasonable accuracy :'( just due to numerical instability. In the above we want the metrics to be less than what is being specified not more. I dont think syrupy has a good way of doing this, but maybe i missed it
tests/e2e/test_s2ef.py
Outdated
return {"src": src} | ||
|
||
|
||
def oc20_lmdb_train_and_val_from_paths(train_src, val_src, test_src=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assuming this is a function so that it is easy to add additional train, val, test src to the tests.
Would it be better to make this a fixture (and if needed can it can be parametrized with different dataset src when the time comes)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was the intention, its only used in two ways in the tests and never both ways back to back.
One way is for training (train=tutorial_dataset,val=tutorial_dataset)
And the other in testing (train=tutorial_dataset,val=tutorial_dataset,test=tutorial_dataset)
I don't know how to parameterize it in some way to make it more readable. The examples i see online seem to show when we want to use all parameterizations of the fixture back to back.
Codecov ReportAll modified and coverable lines are covered by tests ✅ |
…oject/ocp into add_test_for_escn_train
49743a8
to
b833599
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm - thanks @misko!
…d optimization test for [escn,gemnet,equiformer_v2] (#640) * Add a simple pickle dataset type and a test case for escn training * fix import * lint * wrong paths * circleci gets a bit diff result than local, add buffer * Add S2EF e2e test * working e2e smoke test and short optimizer tests * remove unused pickle dataset support and data files * add torch deterministic * lint * lint again * clean up tests using parameterize, add tests for predict * lint * remove unused imports from test_escn * fixes * lint * fix lint * fix yaml paths * correct scaling path * promote up tests folder * fix up tests --------- Co-authored-by: Richard Barnes <rbarnes@umn.edu>
Add a test case for training a simple eSCN model on a small subset of OC22 (first 16 elements of train).
To suppor this I added the pickle dataset format. This is a simple list of pytorch geometric objects returned from the lmdb dataloaders.
^ generate a pickle dataset from an existing lmdb dataset
We can use tests like this in the main repo and also in developing experimental branches to automatically test and confirm that we did not obviously break training.