From 97b961e3f6af8b5ed8aa40f8a9ea0dd98dbb86f0 Mon Sep 17 00:00:00 2001 From: Tom Silver Date: Tue, 21 Nov 2023 09:50:39 -0500 Subject: [PATCH 1/3] add info to FD crashes (#1582) --- predicators/planning.py | 3 ++- tests/approaches/test_oracle_approach.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/predicators/planning.py b/predicators/planning.py index 4f398ecd9e..eb1337d521 100644 --- a/predicators/planning.py +++ b/predicators/planning.py @@ -1060,7 +1060,8 @@ def fd_plan_from_sas_file( metrics: Metrics = defaultdict(float) num_nodes_expanded = re.findall(r"Expanded (\d+) state", output) num_nodes_created = re.findall(r"Evaluated (\d+) state", output) - assert len(num_nodes_expanded) == 1 + if len(num_nodes_expanded) != 1: + raise PlanningFailure(f"Plan not found with FD! Error: {output}") assert len(num_nodes_created) == 1 metrics["num_nodes_expanded"] = float(num_nodes_expanded[0]) metrics["num_nodes_created"] = float(num_nodes_created[0]) diff --git a/tests/approaches/test_oracle_approach.py b/tests/approaches/test_oracle_approach.py index 13c8ec3454..a5ca837a22 100644 --- a/tests/approaches/test_oracle_approach.py +++ b/tests/approaches/test_oracle_approach.py @@ -754,6 +754,7 @@ def simulate(self, state, action): return self._transition_stack(state, x, y, z) env = _ExternalBlocksEnv() + assert env.get_name() == "external_blocks" # Create external options by modifying blocks options. options = set() From 0bdd180027fa8fefd56ae531731c121d8e9dd511 Mon Sep 17 00:00:00 2001 From: Tom Silver Date: Tue, 21 Nov 2023 10:45:25 -0500 Subject: [PATCH 2/3] disable flakey tests (#1586) --- .coveragerc | 2 ++ tests/approaches/test_pg3_analogy_approach.py | 10 ++++++++-- tests/envs/test_pybullet_cover.py | 8 ++++++-- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.coveragerc b/.coveragerc index b3cb5ad766..6e0c85841b 100644 --- a/.coveragerc +++ b/.coveragerc @@ -4,6 +4,8 @@ omit = predicators/envs/kitchen.py predicators/perception/kitchen_perceiver.py predicators/ground_truth_models/kitchen/** + # Currently disabled due to flakiness in the SME dependency. + predicators/approaches/sme_pg3_analogy_approach.py [report] # Regexes for lines to exclude from consideration diff --git a/tests/approaches/test_pg3_analogy_approach.py b/tests/approaches/test_pg3_analogy_approach.py index 55700e3b3c..52c9cdb079 100644 --- a/tests/approaches/test_pg3_analogy_approach.py +++ b/tests/approaches/test_pg3_analogy_approach.py @@ -145,8 +145,14 @@ def test_pg3_analogy_approach(): )""" -def test_find_env_analogies(): - """Tests for _find_env_analogies().""" +def _disabled_test_find_env_analogies(): # pragma: no cover + """Tests for _find_env_analogies(). + + NOTE: this test is currently disabled because of sudden flakiness in the + SME depedency, despite no changes for months. Since we're not actively + using this code, we're just disabling it, but leaving it here in case we + do want to resurrect the code in the future. + """ # Test for gripper -> ferry. base_env = create_new_env("pddl_gripper_procedural_tasks") base_nsrts = get_gt_nsrts(base_env.get_name(), base_env.predicates, diff --git a/tests/envs/test_pybullet_cover.py b/tests/envs/test_pybullet_cover.py index 0794b6c010..c8df9aae8a 100644 --- a/tests/envs/test_pybullet_cover.py +++ b/tests/envs/test_pybullet_cover.py @@ -166,8 +166,12 @@ def test_pybullet_cover_step(env): assert abs(state.get(block, "pose") - 0.75) < 0.01 -def test_pybullet_cover_pick_workspace_bounds(env): - """Tests for picking at workspace bounds in PyBulletCoverEnv.""" +def _disabled_test_pybullet_cover_pick_workspace_bounds( + env): # pragma: no cover + """Tests for picking at workspace bounds in PyBulletCoverEnv. + + This is currently disabled due to nondeterminism issues in IK. + """ block = Object("block0", env.block_type) robot = env.robot workspace_x, workspace_z = env.workspace_dimensions From 5c029fc2dbdeb24f470198121a5677e02dc01e36 Mon Sep 17 00:00:00 2001 From: Tom Silver Date: Tue, 21 Nov 2023 11:00:51 -0500 Subject: [PATCH 3/3] Remove dead email and add NJK email in README (#1583) with Rohan's blessing --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c411f3207d..39fb557e9c 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ## Repository Description -This codebase implements a framework for *bilevel planning with learned neuro-symbolic relational abstractions*, as described in [this paper](https://arxiv.org/abs/2203.09634). Several features are concurrently under active development. **Please contact and before attempting to use it for your own research.** In particular, this codebase aims to ultimately provide an integrated system for learning the ingredients of search-then-sample bilevel planning with learned abstractions. That includes: options, predicates, operators, and samplers. +This codebase implements a framework for *bilevel planning with learned neuro-symbolic relational abstractions*, as described in [this paper](https://arxiv.org/abs/2203.09634). Several features are concurrently under active development. **Please contact or before attempting to use it for your own research.** In particular, this codebase aims to ultimately provide an integrated system for learning the ingredients of search-then-sample bilevel planning with learned abstractions. That includes: options, predicates, operators, and samplers. ### Code Structure