fix unit test

This commit is contained in:
Remi Cadene
2024-09-26 11:48:22 +02:00
parent 500d505bf6
commit f2b1842d69
2 changed files with 4 additions and 3 deletions

View File

@@ -561,9 +561,9 @@ def record(
else:
imgs_dir = videos_dir / f"{key}_episode_{episode_index:06d}"
ep_dict[key] = []
for frame_index in range(num_frames):
img_path = imgs_dir / f"frame_{frame_index:06d}.png"
ep_dict[key].append(img_path)
for i in range(num_frames):
img_path = imgs_dir / f"frame_{i:06d}.png"
ep_dict[key].append({"path": str(img_path)})
for key in not_image_keys:
ep_dict[key] = torch.stack(ep_dict[key])

View File

@@ -114,6 +114,7 @@ def test_record_and_replay_and_policy(tmpdir, request, robot_type, mock):
cfg,
warmup_time_s=1,
episode_time_s=1,
num_episodes=2,
run_compute_stats=False,
push_to_hub=False,
video=False,