Closed becktepe closed 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
Thank you for reporting the bug. I will solve this issue and it should be fixed very soon.
Apparently there is a typo in
dacbench/abstract_env.py
in theuse_training_set
function at line 362. Here, the training set is assigned to the current instances set, but the variableself.training_instances
does not exist:self.instance_set = self.training_instances
I think it should be as follows:
self.instance_set = self.training_set