Skip to content

Commit aa7bc8c

Browse files
committed
DoNothingDataset
1 parent 82832ad commit aa7bc8c

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

amago/loading.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -707,3 +707,27 @@ def _traj_to_rl_data(self, traj: Trajectory | FrozenTraj) -> RLData:
707707
dones=dones,
708708
actions=actions,
709709
)
710+
711+
712+
class DoNothingDataset(RLDataset):
713+
"""A dataset that does nothing and is never ready for training.
714+
715+
Useful for repurposing Experiment to manage inference or eval only.
716+
"""
717+
718+
def __init__(self):
719+
super().__init__(dset_name="DoNothingDataset")
720+
721+
@property
722+
def save_new_trajs_to(self):
723+
return None
724+
725+
@property
726+
def ready_for_training(self):
727+
return False
728+
729+
def get_description(self):
730+
return self.dset_name
731+
732+
def sample_random_trajectory(self) -> RLData:
733+
raise NotImplementedError("DoNothingDataset does not support training!")

0 commit comments

Comments
 (0)