diff --git a/src/imitation/data/serialize.py b/src/imitation/data/serialize.py index ee9d0d3f8..fe6508cdb 100644 --- a/src/imitation/data/serialize.py +++ b/src/imitation/data/serialize.py @@ -20,7 +20,7 @@ def save(path: AnyPath, trajectories: Sequence[Trajectory]) -> None: trajectories: The trajectories to save. """ p = util.parse_path(path) - huggingface_utils.trajectories_to_dataset(trajectories).save_to_disk(p) + huggingface_utils.trajectories_to_dataset(trajectories).save_to_disk(str(p)) logging.info(f"Dumped demonstrations to {p}.")