Skip to content

AttributeError in TargetFunctionRunner #1176

@RSD6170

Description

@RSD6170

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions