From 9913176364daceba1cc7d9f63e452951a602fffb Mon Sep 17 00:00:00 2001 From: NishanthJKumar Date: Fri, 29 Nov 2024 09:47:56 -0500 Subject: [PATCH] fix --- .../grammar_search_invention_approach.py | 1 - scripts/cluster_utils.py | 1 + scripts/configs/pred_invention_vlm.yaml | 194 +++++++++--------- 3 files changed, 98 insertions(+), 98 deletions(-) diff --git a/predicators/approaches/grammar_search_invention_approach.py b/predicators/approaches/grammar_search_invention_approach.py index a348f4d77..5197ce575 100644 --- a/predicators/approaches/grammar_search_invention_approach.py +++ b/predicators/approaches/grammar_search_invention_approach.py @@ -1044,7 +1044,6 @@ def _rename_predicates_to_remove_incompatible_chars( return renamed_predicates def learn_from_offline_dataset(self, dataset: Dataset) -> None: - import ipdb; ipdb.set_trace() if CFG.offline_data_method in [ "geo_and_demo_with_vlm_imgs", "geo_and_demo+labelled_atoms", "geo_and_saved_vlm_img_demos_folder" diff --git a/scripts/cluster_utils.py b/scripts/cluster_utils.py index e765c9c8f..fd59487d3 100644 --- a/scripts/cluster_utils.py +++ b/scripts/cluster_utils.py @@ -106,6 +106,7 @@ def generate_run_configs(config_filename: str, train_refinement_estimator = False # Loop over approaches. for approach_exp_id, approach_config in config["APPROACHES"].items(): + import ipdb; ipdb.set_trace() if approach_config.get("SKIP", False): continue approach = approach_config["NAME"] diff --git a/scripts/configs/pred_invention_vlm.yaml b/scripts/configs/pred_invention_vlm.yaml index b02b17b64..c134e48cd 100644 --- a/scripts/configs/pred_invention_vlm.yaml +++ b/scripts/configs/pred_invention_vlm.yaml @@ -1,7 +1,7 @@ # Experiments to test predicate invention with VLMs --- APPROACHES: - ours: + # ours: # NAME: "grammar_search_invention" # FLAGS: # grammar_search_vlm_atom_proposal_prompt_type: options_labels_whole_traj_diverse @@ -48,70 +48,70 @@ APPROACHES: # vlm_open_loop_use_training_demos: False ENVS: - burger_no_move_more_stacks: - NAME: "burger_no_move" - FLAGS: - burger_no_move_task_type: "more_stacks" - bilevel_plan_without_sim: True - segmenter: option_changes - grammar_search_vlm_atom_label_prompt_type: img_option_diffs_label_history_burger - grammar_search_task_planning_timeout: 10.0 - sesame_max_skeletons_optimized: 200 - disable_harmlessness_check: True - sesame_task_planner: fdopt - excluded_predicates: all - option_model_terminate_on_repeat: False - grammar_search_vlm_atom_proposal_use_debug: False - allow_exclude_goal_predicates: True - grammar_search_prune_redundant_preds: True - grammar_search_predicate_cost_upper_bound: 13 - allow_state_allclose_comparison_despite_simulator_state: True - grammar_search_max_predicates: 100 - grammar_search_parallelize_vlm_labeling: True - grammar_search_use_handcoded_debug_grammar: False - grammar_search_select_all_debug: False - cluster_and_intersect_soft_intersection_for_preconditions: True - vlm_include_cropped_images: True - timeout: 80 - grammar_search_grammar_includes_givens: False - cluster_and_intersect_prune_low_data_pnads: True - cluster_and_intersect_min_datastore_fraction: 0.05 - num_train_tasks: 12 # 8 for VILA - precondition_soft_intersection_threshold_percent: 0.8 - grammar_search_early_termination_heuristic_thresh: 2000 - vlm_double_check_output: True - burger_no_move_fatter_burger: - NAME: "burger_no_move" - FLAGS: - burger_no_move_task_type: "fatter_burger" - bilevel_plan_without_sim: True - segmenter: option_changes - grammar_search_vlm_atom_label_prompt_type: img_option_diffs_label_history_burger - grammar_search_task_planning_timeout: 10.0 - sesame_max_skeletons_optimized: 200 - disable_harmlessness_check: True - sesame_task_planner: fdopt - excluded_predicates: all - option_model_terminate_on_repeat: False - grammar_search_vlm_atom_proposal_use_debug: False - allow_exclude_goal_predicates: True - grammar_search_prune_redundant_preds: True - grammar_search_predicate_cost_upper_bound: 13 - allow_state_allclose_comparison_despite_simulator_state: True - grammar_search_max_predicates: 100 - grammar_search_parallelize_vlm_labeling: True - grammar_search_use_handcoded_debug_grammar: False - grammar_search_select_all_debug: False - cluster_and_intersect_soft_intersection_for_preconditions: True - vlm_include_cropped_images: True - timeout: 80 - grammar_search_grammar_includes_givens: False - cluster_and_intersect_prune_low_data_pnads: True - cluster_and_intersect_min_datastore_fraction: 0.05 - num_train_tasks: 12 - precondition_soft_intersection_threshold_percent: 0.8 - grammar_search_early_termination_heuristic_thresh: 2000 - vlm_double_check_output: True + # burger_no_move_more_stacks: + # NAME: "burger_no_move" + # FLAGS: + # burger_no_move_task_type: "more_stacks" + # bilevel_plan_without_sim: True + # segmenter: option_changes + # grammar_search_vlm_atom_label_prompt_type: img_option_diffs_label_history_burger + # grammar_search_task_planning_timeout: 10.0 + # sesame_max_skeletons_optimized: 200 + # disable_harmlessness_check: True + # sesame_task_planner: fdopt + # excluded_predicates: all + # option_model_terminate_on_repeat: False + # grammar_search_vlm_atom_proposal_use_debug: False + # allow_exclude_goal_predicates: True + # grammar_search_prune_redundant_preds: True + # grammar_search_predicate_cost_upper_bound: 13 + # allow_state_allclose_comparison_despite_simulator_state: True + # grammar_search_max_predicates: 100 + # grammar_search_parallelize_vlm_labeling: True + # grammar_search_use_handcoded_debug_grammar: False + # grammar_search_select_all_debug: False + # cluster_and_intersect_soft_intersection_for_preconditions: True + # vlm_include_cropped_images: True + # timeout: 80 + # grammar_search_grammar_includes_givens: False + # cluster_and_intersect_prune_low_data_pnads: True + # cluster_and_intersect_min_datastore_fraction: 0.05 + # num_train_tasks: 12 + # precondition_soft_intersection_threshold_percent: 0.8 + # grammar_search_early_termination_heuristic_thresh: 2000 + # vlm_double_check_output: True + # burger_no_move_fatter_burger: + # NAME: "burger_no_move" + # FLAGS: + # burger_no_move_task_type: "fatter_burger" + # bilevel_plan_without_sim: True + # segmenter: option_changes + # grammar_search_vlm_atom_label_prompt_type: img_option_diffs_label_history_burger + # grammar_search_task_planning_timeout: 10.0 + # sesame_max_skeletons_optimized: 200 + # disable_harmlessness_check: True + # sesame_task_planner: fdopt + # excluded_predicates: all + # option_model_terminate_on_repeat: False + # grammar_search_vlm_atom_proposal_use_debug: False + # allow_exclude_goal_predicates: True + # grammar_search_prune_redundant_preds: True + # grammar_search_predicate_cost_upper_bound: 13 + # allow_state_allclose_comparison_despite_simulator_state: True + # grammar_search_max_predicates: 100 + # grammar_search_parallelize_vlm_labeling: True + # grammar_search_use_handcoded_debug_grammar: False + # grammar_search_select_all_debug: False + # cluster_and_intersect_soft_intersection_for_preconditions: True + # vlm_include_cropped_images: True + # timeout: 80 + # grammar_search_grammar_includes_givens: False + # cluster_and_intersect_prune_low_data_pnads: True + # cluster_and_intersect_min_datastore_fraction: 0.05 + # num_train_tasks: 12 + # precondition_soft_intersection_threshold_percent: 0.8 + # grammar_search_early_termination_heuristic_thresh: 2000 + # vlm_double_check_output: True burger_no_move_combo_burger: NAME: "burger_no_move" FLAGS: @@ -144,38 +144,38 @@ ENVS: precondition_soft_intersection_threshold_percent: 0.8 grammar_search_early_termination_heuristic_thresh: 2000 vlm_double_check_output: True - kitchen_boil_kettle: - NAME: "kitchen" - FLAGS: - perceiver: "kitchen" - kitchen_goals: "boil_kettle" - kitchen_use_perfect_samplers: True - kitchen_render_set_of_marks: True - kitchen_use_combo_move_nsrts: True - kitchen_randomize_init_state: True - bilevel_plan_without_sim: True - segmenter: option_changes - grammar_search_vlm_atom_label_prompt_type: img_option_diffs_label_history - grammar_search_task_planning_timeout: 3.0 - sesame_max_skeletons_optimized: 5 - disable_harmlessness_check: True - excluded_predicates: all - grammar_search_vlm_atom_proposal_use_debug: False - grammar_search_prune_redundant_preds: True - grammar_search_predicate_cost_upper_bound: 13 - allow_state_allclose_comparison_despite_simulator_state: True - grammar_search_max_predicates: 100 - grammar_search_parallelize_vlm_labeling: True - grammar_search_use_handcoded_debug_grammar: False - grammar_search_select_all_debug: False - cluster_and_intersect_soft_intersection_for_preconditions: True - grammar_search_grammar_includes_givens: False - cluster_and_intersect_prune_low_data_pnads: True - cluster_and_intersect_min_datastore_fraction: 0.05 - num_train_tasks: 3 - precondition_soft_intersection_threshold_percent: 0.8 - vlm_double_check_output: True - grammar_search_early_termination_heuristic_thresh: 100 + # kitchen_boil_kettle: + # NAME: "kitchen" + # FLAGS: + # perceiver: "kitchen" + # kitchen_goals: "boil_kettle" + # kitchen_use_perfect_samplers: True + # kitchen_render_set_of_marks: True + # kitchen_use_combo_move_nsrts: True + # kitchen_randomize_init_state: True + # bilevel_plan_without_sim: True + # segmenter: option_changes + # grammar_search_vlm_atom_label_prompt_type: img_option_diffs_label_history + # grammar_search_task_planning_timeout: 3.0 + # sesame_max_skeletons_optimized: 5 + # disable_harmlessness_check: True + # excluded_predicates: all + # grammar_search_vlm_atom_proposal_use_debug: False + # grammar_search_prune_redundant_preds: True + # grammar_search_predicate_cost_upper_bound: 13 + # allow_state_allclose_comparison_despite_simulator_state: True + # grammar_search_max_predicates: 100 + # grammar_search_parallelize_vlm_labeling: True + # grammar_search_use_handcoded_debug_grammar: False + # grammar_search_select_all_debug: False + # cluster_and_intersect_soft_intersection_for_preconditions: True + # grammar_search_grammar_includes_givens: False + # cluster_and_intersect_prune_low_data_pnads: True + # cluster_and_intersect_min_datastore_fraction: 0.05 + # num_train_tasks: 3 + # precondition_soft_intersection_threshold_percent: 0.8 + # vlm_double_check_output: True + # grammar_search_early_termination_heuristic_thresh: 100 ARGS: [] FLAGS: