Skip to content

Commit 7172849

Browse files
committed
ready to merge & pull request
1 parent 9991718 commit 7172849

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
- Updated the Cost over Time documentation accordingly.
77

88
## Bug-Fixes
9-
- When getting budget, attributes etc from multiple runs in Cost over Time and Pareto Front:
9+
- When getting budget, objectives etc from multiple runs in Cost over Time and Pareto Front:
1010
- Instead of taking the first run as comparative value,
1111
- take the one with the lowest budget, else the index for the budgets could be out of bounds.
1212

deepcave/plugins/objective/cost_over_time.py

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

2727
def check_runs_compatibility(self, runs: List[AbstractRun]) -> None:
28+
# If the runs are not mergeable, they still should be displayed
29+
# but with a corresponding warning message
2830
try:
2931
check_equality(runs, objectives=True, budgets=True)
3032
except NotMergeableError as e:
@@ -41,8 +43,8 @@ def check_runs_compatibility(self, runs: List[AbstractRun]) -> None:
4143
notification.update("The objectives of the runs are not equal.", color="warning")
4244

4345
# Set some attributes here
44-
# It is necessary to get the run with the smallest budget as
45-
# first comparative value, else there is gonna be an index problem
46+
# It is necessary to get the run with the smallest budget and objective options
47+
# as first comparative value, else there is gonna be an index problem
4648
objective_options = []
4749
budget_options = []
4850
for run in runs:
@@ -56,7 +58,6 @@ def check_runs_compatibility(self, runs: List[AbstractRun]) -> None:
5658
self.objective_options = min(objective_options, key=len)
5759
self.budget_options = min(budget_options, key=len)
5860

59-
6061
@staticmethod
6162
def get_input_layout(register):
6263
return [

deepcave/plugins/objective/pareto_front.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ class ParetoFront(DynamicPlugin):
2525
help = "docs/plugins/pareto_front.rst"
2626

2727
def check_runs_compatibility(self, runs):
28+
# If the runs are not mergeable, they still should be displayed
29+
# but with a corresponding warning message
2830
try:
2931
check_equality(runs, objectives=True, budgets=True)
3032
except NotMergeableError as e:
@@ -41,8 +43,8 @@ def check_runs_compatibility(self, runs):
4143
notification.update("The objectives of the runs are not equal.", color="warning")
4244

4345
# Set some attributes here
44-
# It is necessary to get the run with the smallest budget as
45-
# first comparative value, else there is gonna be an index problem
46+
# It is necessary to get the run with the smallest budget and objective options
47+
# as first comparative value, else there is gonna be an index problem
4648
objective_options = []
4749
budget_options = []
4850
for run in runs:
@@ -56,7 +58,6 @@ def check_runs_compatibility(self, runs):
5658
self.objective_options = min(objective_options, key=len)
5759
self.budget_options = min(budget_options, key=len)
5860

59-
6061
@staticmethod
6162
def get_input_layout(register):
6263
return [

0 commit comments

Comments
 (0)