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

AttributeError in TargetFunctionRunner #1176

Open
RSD6170 opened this issue Dec 2, 2024 · 1 comment · May be fixed by #1177
Open

AttributeError in TargetFunctionRunner #1176

RSD6170 opened this issue Dec 2, 2024 · 1 comment · May be fixed by #1177
Assignees
Labels
Milestone

Comments

@RSD6170
Copy link

RSD6170 commented Dec 2, 2024

Description

When using SMAC to optimize the runtime of an algorithm, the error report in runhistory.json does not report the raised exception, but an SMAC-internal error in TargetFunctionRunner, namely that the crash_cost attribute does not exist as

cost = self.crash_cost

misses an underscore in comparison to
self._crash_cost = scenario.crash_cost

Actual Results

Taken from runhistory.json:

Traceback (most recent call last):
  File "/home/ubuntu/miniconda3/envs/learning_History/lib/python3.10/site-packages/smac/runner/abstract_runner.py", line 110, in run_wrapper
    status, cost, runtime, additional_info = self.run(
  File "/home/ubuntu/miniconda3/envs/learning_History/lib/python3.10/site-packages/smac/runner/target_function_runner.py", line 238, in run
    cost = self.crash_cost
AttributeError: 'TargetFunctionRunner' object has no attribute 'crash_cost'

Versions

2.2.0

@benjamc benjamc added the bug label Dec 4, 2024
@benjamc benjamc self-assigned this Dec 4, 2024
@benjamc benjamc linked a pull request Dec 4, 2024 that will close this issue
@benjamc
Copy link
Collaborator

benjamc commented Dec 4, 2024

Hi RSD6170,
thanks for letting us know.
The issue will be fixed via this PR #1177 and will be soon in the next release.
Best

@benjamc benjamc moved this to Review in SMAC board Dec 4, 2024
@benjamc benjamc added this to the v2.3 milestone Dec 4, 2024
@benjamc benjamc linked a pull request Dec 4, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Review
Development

Successfully merging a pull request may close this issue.

2 participants