fix unit tests, stats was missing, visualize_dataset was broken

This commit is contained in:
Cadene
2024-04-16 12:53:31 +00:00
parent 69eeced9d9
commit 4a3eac4743
9 changed files with 37 additions and 16 deletions

View File

@@ -53,7 +53,11 @@ def make_dataset(
stats["action"]["max"] = torch.tensor([511.0, 511.0], dtype=torch.float32)
elif stats_path is None:
# load stats if the file exists already or compute stats and save it
precomputed_stats_path = Path("data") / cfg.dataset_id / "stats.pth"
if DATA_DIR is None:
# TODO(rcadene): clean stats
precomputed_stats_path = Path("data") / cfg.dataset_id / "stats.pth"
else:
precomputed_stats_path = DATA_DIR / cfg.dataset_id / "stats.pth"
if precomputed_stats_path.exists():
stats = torch.load(precomputed_stats_path)
else: