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

Fix/1176 #1177

Merged
merged 2 commits into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
# Examples
- Add warmstarting example (#1120)

# Bugfix
- Fix wrong attr query in the target function runner (crash cost) (#1176)

# 2.2.0

## Examples
Expand Down
4 changes: 2 additions & 2 deletions smac/runner/target_function_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def run(
ordered_cost: list[float] = []
for name in self._objectives:
if name not in result:
raise RuntimeError(f"Objective {name} was not found in the returned costs.")
raise RuntimeError(f"Objective {name} was not found in the returned costs.") # noqa: E713

ordered_cost.append(result[name])

Expand All @@ -240,7 +240,7 @@ def run(

if cost is None:
status = StatusType.CRASHED
cost = self.crash_cost
cost = self._crash_cost

# We want to get either a float or a list of floats.
cost = np.asarray(cost).squeeze().tolist()
Expand Down
Loading