Skip to content

Commit

Permalink
Remove hard coded configs
Browse files Browse the repository at this point in the history
  • Loading branch information
hdefazio committed Nov 3, 2023
1 parent 321960a commit 9598a88
Showing 1 changed file with 2 additions and 19 deletions.
21 changes: 2 additions & 19 deletions angel_system/global_step_prediction/global_step_predictor.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ def __init__(
self.activity_conf_history = np.empty((0, num_activity_classes))

self.recipe_types = recipe_types
self.recipe_configs = recipe_config_dict

# Array of tracker dicts
self.trackers = []
Expand Down Expand Up @@ -91,8 +92,6 @@ def __init__(
)
)

self.recipe_configs = recipe_config_dict

self.gt_activities_order_from_each_config = {
_recipe: self.get_activity_order_from_config(self.recipe_configs[_recipe])
for _recipe in self.recipe_configs
Expand Down Expand Up @@ -195,23 +194,7 @@ def initialize_new_recipe_tracker(self, recipe, config_fn=None):
"""
tracker_dict = {}
if recipe == "coffee":
if config_fn == None:
config_fn = "config/tasks/recipe_coffee.yaml"
elif recipe == "tea":
if config_fn == None:
config_fn = "config/tasks/recipe_tea.yaml"
elif recipe == "dessert_quesadilla":
if config_fn == None:
config_fn = "config/tasks/recipe_dessertquesadilla.yaml"
elif recipe == "oatmeal":
if config_fn == None:
config_fn = "config/tasks/recipe_oatmeal.yaml"
elif recipe == "pinwheel":
if config_fn == None:
config_fn = "config/tasks/recipe_pinwheel.yaml"
else:
raise ValueError(f"Invalid recipe type. Valid types: [coffee].")
config_fn = self.recipe_configs[recipe]

# Read in task config
with open(config_fn, "r") as stream:
Expand Down

0 comments on commit 9598a88

Please sign in to comment.