automl / DACBench

A benchmark library for Dynamic Algorithm Configuration.
https://automl.github.io/DACBench/
Apache License 2.0
28 stars 13 forks source link

Switching back to training set causes runtime error #124

Closed becktepe closed 2 years ago

becktepe commented 2 years ago

Apparently there is a typo in dacbench/abstract_env.py in the use_training_set function at line 362. Here, the training set is assigned to the current instances set, but the variable self.training_instances does not exist: self.instance_set = self.training_instances

I think it should be as follows: self.instance_set = self.training_set

becktepe commented 2 years ago

Code to reproduce the error:

from dacbench.benchmarks import LubyBenchmark
from dacbench.abstract_benchmark import objdict

config = objdict(
            {
                "instance_set_path": "../instance_sets/luby/luby_default.csv",
                "test_set_path": "../instance_sets/luby/luby_default.csv"
            }
        )

bench = LubyBenchmark(config=config)
env = bench.get_environment()
env.use_test_set()
env.use_training_set()  # this line causes an error
areebfarhan commented 2 years ago

Thank you for reporting the bug. I will solve this issue and it should be fixed very soon.