Add regression tests (#119)
- 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
This commit is contained in:
@@ -265,7 +265,7 @@ def test_backward_compatibility(repo_id):
|
||||
|
||||
for key in new_frame:
|
||||
assert torch.isclose(
|
||||
new_frame[key], old_frame[key], rtol=1e-05, atol=1e-08
|
||||
new_frame[key], old_frame[key]
|
||||
).all(), f"{key=} for index={i} does not contain the same value"
|
||||
|
||||
# test2 first frames of first episode
|
||||
|
||||
Reference in New Issue
Block a user