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
这个提交包含在:
Simon Alibert
2024-05-04 16:20:30 +02:00
提交者 GitHub
父节点 19812ca470
当前提交 c77633c38c
共有 15 个文件被更改,包括 236 次插入 和 43 次删除

查看文件

@ -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