Skip to content

Commit 735843f

Browse files
committed
Overflow Index error fixed
1 parent 4fd326b commit 735843f

File tree

2 files changed

+15
-7
lines changed

2 files changed

+15
-7
lines changed

deepcave/plugins/dynamic.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ def plugin_output_update(_, *inputs_list): # type: ignore
4242
runs = self.get_selected_runs(inputs)
4343

4444
raw_outputs = {}
45+
rc.clear()
4546
for run in runs:
4647
run_outputs = rc.get(run, self.id, inputs_key)
4748
if run_outputs is None:

deepcave/plugins/objective/cost_over_time.py

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ class CostOverTime(DynamicPlugin):
2525
help = "docs/plugins/cost_over_time.rst"
2626

2727
def check_runs_compatibility(self, runs: List[AbstractRun]) -> None:
28+
print("HALLO")
2829
try:
2930
check_equality(runs, objectives=True, budgets=True)
3031
except NotMergeableError as e:
@@ -41,15 +42,21 @@ def check_runs_compatibility(self, runs: List[AbstractRun]) -> None:
4142
notification.update("The objectives of the runs are not equal.", color="warning")
4243

4344
# Set some attributes here
44-
run = runs[0]
45+
objective_options = []
46+
budget_options = []
47+
for run in runs:
48+
objective_names = run.get_objective_names()
49+
objective_ids = run.get_objective_ids()
50+
objective_options.append(get_select_options(objective_names, objective_ids))
4551

46-
objective_names = run.get_objective_names()
47-
objective_ids = run.get_objective_ids()
48-
self.objective_options = get_select_options(objective_names, objective_ids)
52+
budgets = run.get_budgets(human=True)
53+
budget_ids = run.get_budget_ids()
54+
budget_options.append(get_select_options(budgets, budget_ids))
55+
self.objective_options = min(objective_options, key=len)
56+
self.budget_options = min(budget_options, key=len)
57+
print(self.budget_options)
58+
print(self.objective_options)
4959

50-
budgets = run.get_budgets(human=True)
51-
budget_ids = run.get_budget_ids()
52-
self.budget_options = get_select_options(budgets, budget_ids)
5360

5461
@staticmethod
5562
def get_input_layout(register):

0 commit comments

Comments
 (0)