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

Bugfix/Fix errors due to changing inputs before runselection #104

Merged
merged 2 commits into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

## Bug-Fixes
- Don't convert BOHB runs with status 'running' (consistent with SMAC).
- Fix errors due to changing inputs before runselection (#64).

# Version 1.1.3

Expand Down
19 changes: 10 additions & 9 deletions deepcave/plugins/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,17 +365,18 @@ def plugin_input_update(pathname: str, *inputs_list: str) -> List[str]:
# E.g. if options from budget in run_2 and run_3 are the same
# take the budget from run_2 if changed to run_3. Otherwise,
# reset budgets.
if _run_id:
selected_run = run_handler.get_run(_run_id)

selected_run = run_handler.get_run(_run_id)

# How to update only parameters which have a dependency?
user_dependencies_inputs = self.load_dependency_inputs(
selected_run, _previous_inputs, _inputs
)
if selected_run is not None:
# How to update only parameters which have a dependency?
user_dependencies_inputs = self.load_dependency_inputs(
selected_run, _previous_inputs, _inputs
)

# Update dict
# dict.update() remove keys, so we use our own method to do so
update_dict(inputs, user_dependencies_inputs) # inplace operation
# Update dict
# dict.update() remove keys, so we use our own method to do so
update_dict(inputs, user_dependencies_inputs) # inplace operation

# Let's cast the inputs
inputs = self._cast_inputs(inputs)
Expand Down
1 change: 0 additions & 1 deletion deepcave/plugins/hyperparameter/importances.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ def load_dependency_inputs(self, run, _, inputs):
# Pre-set values
if objective_value is None:
objective_value = objective_ids[0]
n_hps = len(hp_names)

if n_hps == 0:
n_hps = len(hp_names)
Expand Down
1 change: 0 additions & 1 deletion deepcave/plugins/objective/parallel_coordinates.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ def load_dependency_inputs(self, run, _, inputs):
objective_value = objective_ids[0]
budget_value = budget_ids[-1]
hp_value = hp_names
n_hps = len(hp_names)

if n_hps == 0:
n_hps = len(hp_names)
Expand Down
Loading