Skip to content

Commit

Permalink
try again...
Browse files Browse the repository at this point in the history
  • Loading branch information
tomsilver committed Dec 5, 2023
1 parent 0cb1fe6 commit 9f353da
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions predicators/approaches/active_sampler_learning_approach.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +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,
# The online learning cycle is about to be updated, but
# hasn't been yet, hence the + 1.
"online_learning_cycle": self._online_learning_cycle + 1,
"online_learning_cycle": self._online_learning_cycle,
},
f)

Expand Down
4 changes: 2 additions & 2 deletions predicators/approaches/online_nsrt_learning_approach.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ def get_name(cls) -> str:
return "online_nsrt_learning"

def get_interaction_requests(self) -> List[InteractionRequest]:
# This is called at the beginning of a new online learning cycle.
self._online_learning_cycle += 1
# Explore in the train tasks. The number of train tasks that are
# explored at each timestep is a hyperparameter. The train task
# is randomly selected.
Expand Down Expand Up @@ -95,8 +97,6 @@ def learn_from_interaction_results(
self._learn_nsrts(self._dataset.trajectories,
self._online_learning_cycle,
annotations=annotations)
# Advance the online learning cycle.
self._online_learning_cycle += 1

def _update_dataset(self, trajectory: LowLevelTrajectory) -> None:
"""Add a new low-level trajectory to the dataset."""
Expand Down

0 comments on commit 9f353da

Please sign in to comment.