Skip to content

Commit

Permalink
Merge pull request #291 from bdaiinstitute/fix-checks
Browse files Browse the repository at this point in the history
fix dumb syntax issue
  • Loading branch information
NishanthJKumar authored Aug 23, 2024
2 parents ccaa689 + c6f3718 commit d71d26b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion predicators/approaches/maple_q_approach.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ def _learn_nsrts(self, trajectories: List[LowLevelTrajectory],
if (online_learning_cycle is None or len(
self._q_function._ordered_ground_nsrts) + len( # pylint: disable=protected-access
self._q_function._ordered_frozen_goals) + len( # pylint: disable=protected-access
self._q_function._ordered_objects) == 0) and
self._q_function._ordered_objects) == 0) and \
CFG.approach != "rl_bridge_policy": # pylint: disable=protected-access
all_ground_nsrts: Set[_GroundNSRT] = set()
if CFG.sesame_grounder == "naive":
Expand Down
4 changes: 3 additions & 1 deletion predicators/structs.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,11 @@ def allclose(self, other: State) -> bool:
objects are the same, and the features are close."""
if self.simulator_state is not None or \
other.simulator_state is not None:
if not CFG.allow_state_allclose_comparison_despite_simulator_state:
if not CFG.allow_state_allclose_comparison_despite_simulator_state:
raise NotImplementedError("Cannot use allclose when "
"simulator_state is not None.")
if self.simulator_state != other.simulator_state:
return False
return self._allclose(other)

def _allclose(self, other: State) -> bool:
Expand Down

0 comments on commit d71d26b

Please sign in to comment.