-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Add regression tests #119
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
Add regression tests #119
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f22cf5a
to
30a28d8
Compare
aliberts
commented
May 2, 2024
alexander-soare
suggested changes
May 2, 2024
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.
Thanks a lot for this @aliberts. Some comments, mostly minor.
f74945f
to
67f1b50
Compare
alexander-soare
approved these changes
May 2, 2024
4e0f121
to
a5a1d18
Compare
Cadene
approved these changes
May 4, 2024
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.
YEASSSS PLEASE
aliberts
added a commit
that referenced
this pull request
May 4, 2024
- Add `tests/scripts/save_policy_to_safetensor.py` to generate test artifacts - Add `test_backward_compatibility to test generated outputs from the policies against artifacts
Merged
menhguin
pushed a commit
to menhguin/lerobot
that referenced
this pull request
Feb 9, 2025
- Add `tests/scripts/save_policy_to_safetensor.py` to generate test artifacts - Add `test_backward_compatibility to test generated outputs from the policies against artifacts
Kalcy-U
referenced
this pull request
in Kalcy-U/lerobot
May 13, 2025
- Add `tests/scripts/save_policy_to_safetensor.py` to generate test artifacts - Add `test_backward_compatibility to test generated outputs from the policies against artifacts
ZoreAnuj
pushed a commit
to luckyrobots/lerobot
that referenced
this pull request
Jul 29, 2025
- Add `tests/scripts/save_policy_to_safetensor.py` to generate test artifacts - Add `test_backward_compatibility to test generated outputs from the policies against artifacts
Ricci084
pushed a commit
to JeffWang987/lerobot
that referenced
this pull request
Sep 5, 2025
- Add `tests/scripts/save_policy_to_safetensor.py` to generate test artifacts - Add `test_backward_compatibility to test generated outputs from the policies against artifacts
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Review filter
What this does
tests/scripts/save_policy_to_safetensor.py
to generate test artifactstest_backward_compatibility
to test generated outputs from the policies against artifacts:output_dict
grad_stats
(actuallymean
andstd
for each of the policy module's gradient)param_stats
(actuallymean
andstd
for each of the policy's module)actions
Note: Due to floating point precision errors, I had to restrict this test to only be run on an x86_64 kernel, which is what the test artifacts were generated on. This shouldn't be an issue as our CI runs on this platform.
Thanks to @alexander-soare and @Cadene for your precious help on that one!
How was it tested?
I've set
rtol=0.1
andatol=1e-7
for theassert torch.isclose()
through trial & error (see failed tests on commits below)How to checkout & try? (for the reviewer)