openml / automlbenchmark

OpenML AutoML Benchmarking Framework
https://openml.github.io/automlbenchmark
MIT License
391 stars 130 forks source link

Error when trying to launch locally with local files #584

Closed celianlrf closed 11 months ago

celianlrf commented 11 months ago

Hi,

It keeps happening that I try to run locally with some dummy datasets (local files) this error keeps appearing:

python runbenchmark.py decisiontree mybenchmark constrainsprueba --userdir 'scripts/AMLB'

/opt/conda/envs/amlb_env/lib/python3.9/site-packages/_distutils_hack/init.py:33: UserWarning: Setuptools is replacing distutils. warnings.warn("Setuptools is replacing distutils.") Running benchmark decisiontree on mybenchmark framework in local mode. Loading frameworks definitions from ['/scripts/AMLB/automlbenchmark/resources/frameworks.yaml']. Loading benchmark constraint definitions from ['/scripts/AMLB/automlbenchmark/resources/constraints.yaml']. Loading benchmark definitions from /scripts/AMLB/benchmarks/mybenchmark.yaml. 'Namespace' object has no attribute 'openml_task_id' Traceback (most recent call last): File "/scripts/AMLB/automlbenchmark/runbenchmark.py", line 189, in res = bench.run(args.task, args.fold) File "/scripts/AMLB/automlbenchmark/amlb/benchmark.py", line 210, in run jobs = flatten([self._task_jobs(task_def, folds) for task_def in task_defs]) File "/scripts/AMLB/automlbenchmark/amlb/benchmark.py", line 210, in jobs = flatten([self._task_jobs(task_def, folds) for task_def in task_defs]) File "/scripts/AMLB/automlbenchmark/amlb/benchmark.py", line 289, in _task_jobs return list(filter(None, [self._make_job(task_def, f) for f in folds])) File "/scripts/AMLB/automlbenchmark/amlb/benchmark.py", line 289, in return list(filter(None, [self._make_job(task_def, f) for f in folds])) File "/scripts/AMLB/automlbenchmark/amlb/benchmark.py", line 297, in _make_job return BenchmarkTask(self, task_def, fold).as_job() if not self._skip_job(task_def, fold) else None File "/scripts/AMLB/automlbenchmark/amlb/benchmark.py", line 480, in init openml_task_id=task_def.openml_task_id, File "/scripts/AMLB/automlbenchmark/amlb/utils/core.py", line 182, in getattr raise AttributeError(f"'Namespace' object has no attribute '{item}'") AttributeError: 'Namespace' object has no attribute 'openml_task_id'

My benchmark.yaml looks like this:

- name: prueba
  dataset:
    train: ****/data/prueba/prueba_train.csv
    test:  ****/data/prueba/prueba_test.csv
    target: Y

  folds: 1

I also changed the config.yaml to point to the corresponding paths but even without changing it the error is the same.

Thank you very much.

PGijsbers commented 11 months ago

Thanks for opening an issue, I believe that this is a bug introduced by #523 but already fixed in #564. It should be resolved in master, though the v2.1.6 release is still affected. Which version are you trying to run? Can you confirm that it works when running on the last version of master?

celianlrf commented 11 months ago

Thank you for the prompt response. Yes it works now.