From e632b324c18fb6f1f4eb96be86286d4834c095ba Mon Sep 17 00:00:00 2001 From: Tom Silver <135051706+tsilver-bdai@users.noreply.github.com> Date: Mon, 27 Nov 2023 10:01:10 -0500 Subject: [PATCH] merge in upstream changes (#161) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * freeze pytorch version to fix mypy crash (#1563) * Implement infinite-horizon for exploration (#1565) * simple initial implementation * fix checks * okay - really fix checks now * MyPy Bump and changes (#1568) * minor changes to fix bugs (#1569) * fix get_objects in hierarchical typing case (#1572) Co-authored-by: Tom Silver * fix hierarchical typing edge case (#1574) * Fix + raise awareness of subtle bugs with active sampler exploration (#1575) * fix subtle bugs * yapf * Ball and Cup Sticky Table Env (#1576) * initial commit that seems to run without error... * fix bug in placing logic * delete outdated comment * fix replanning bug * more data = better results??? * starting tests * try oracle feature selection? * fix buggy test * increase training time? * yapf + fix tom comment * fix reachability issue in placing * minor * more unit tests * fix and more tests * this should be interesting * see if this yields a difference * let's see what happens now * woops * try removing placing cup with the ball on the table * hail mary * minor changes + logging * run task repeat first * sticky table with moving radius * yay! try other approaches... * polar coordinates ftw! * try a simpler thing * let's see how this does. * try more probability of success * all baselines * try running grid row env * most things passing * try this * progress towards PR * should be ready! * revert unnecessary change * fix linting * tom comments --------- Co-authored-by: Tom Silver * allow third party users to define their own oracle NSRTs (#1578) * allow third party users to define their own oracle NSRTs * test fixes * mypy * Clustering via reverse engineering (#1556) * Initial commit. * Fix a minor bug. * Small changes to satisfy mypi. * Fix linting. * Add tests. * fixes * fix minor grammatical issue * Change check for non-zero types. --------- Co-authored-by: Nishanth Kumar Co-authored-by: Nishanth Kumar * pin openai dependency (#1580) * changes to produce prettier grid row graphs (#1577) * add functionality for rendering videos within cogman, rather than within the environment (#1581) * init commit with prompt hacking * some progress, but not fully there yet (classifiers, etc. are jumpy...) * add info to FD crashes (#1582) * disable flakey tests (#1586) * Remove dead email and add NJK email in README (#1583) with Rohan's blessing * handle planning failures within task planning in active sampler explorer (#1584) * add separate flag for approach wrapper (#1585) * good to go! subgoal accomplished! * update metadata accordingly * i think gtg? * fix spot_env * good for this PR * should be good to go * more merge * wip * minor --------- Co-authored-by: Tom Silver Co-authored-by: Nishanth Kumar Co-authored-by: Bartłomiej Cieślar <37981302+barci2@users.noreply.github.com> Co-authored-by: Tom Silver Co-authored-by: Ashay Athalye Co-authored-by: Nishanth Kumar Co-authored-by: NishanthJKumar Co-authored-by: Nishanth J. Kumar <129975718+nkumar-bdai@users.noreply.github.com> --- predicators/planning.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/predicators/planning.py b/predicators/planning.py index 273e1253ac..561a434831 100644 --- a/predicators/planning.py +++ b/predicators/planning.py @@ -1180,7 +1180,10 @@ def run_task_plan_once( max_horizon: float = np.inf, **kwargs: Any ) -> Tuple[List[_GroundNSRT], List[Set[GroundAtom]], Metrics]: - """Get a single abstract plan for a task.""" + """Get a single abstract plan for a task. + + The sequence of ground atom sets returned represent NECESSARY atoms. + """ init_atoms = utils.abstract(task.init, preds) goal = task.goal @@ -1255,7 +1258,10 @@ def run_task_plan_once( raise ValueError("Unrecognized sesame_task_planner: " f"{CFG.sesame_task_planner}") - return plan, atoms_seq, metrics + necessary_atoms_seq = utils.compute_necessary_atoms_seq( + plan, atoms_seq, goal) + + return plan, necessary_atoms_seq, metrics class PlanningFailure(utils.ExceptionWithInfo):