Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix dumb syntax issue #291

Merged
merged 2 commits into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading