Skip to content

Commit

Permalink
save and load online learning cycle in active sampler learning
Browse files Browse the repository at this point in the history
  • Loading branch information
tomsilver committed Dec 5, 2023
1 parent ed233bc commit a2ec193
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion predicators/approaches/active_sampler_learning_approach.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def load(self, online_learning_cycle: Optional[int]) -> None:
self._nsrt_to_explorer_sampler = save_dict["nsrt_to_explorer_sampler"]
self._seen_train_task_idxs = save_dict["seen_train_task_idxs"]
self._train_tasks = save_dict["train_tasks"]
self._online_learning_cycle = CFG.skip_until_cycle + 1
self._online_learning_cycle = save_dict["online_learning_cycle"]

def _learn_nsrts(self, trajectories: List[LowLevelTrajectory],
online_learning_cycle: Optional[int],
Expand Down Expand Up @@ -192,6 +192,7 @@ def _learn_nsrts(self, trajectories: List[LowLevelTrajectory],
# generated before reset with default init states, which
# are subsequently overwritten after reset is called.
"train_tasks": self._train_tasks,
"online_learning_cycle": self._online_learning_cycle,
},
f)

Expand Down

0 comments on commit a2ec193

Please sign in to comment.