Skip to content

fetch openml fails when ignore_attribute is not categorical #12329

@janvanrijn

Description

@janvanrijn

Due to a wrong order of logic in fetch_openml

Error as mentioned by @amueller in openml/OpenML#813

Fix on it's way.

MWE:

import sklearn.datasets

sklearn.datasets.fetch_openml(data_id=1119)

traceback:

Traceback (most recent call last):
  File "/home/janvanrijn/projects/scikit-learn/fetch.py", line 3, in <module>
    sklearn.datasets.fetch_openml(data_id=1119)
  File "/home/janvanrijn/projects/scikit-learn/sklearn/datasets/openml.py", line 566, in fetch_openml
    del nominal_attributes[feature['name']]
KeyError: 'ID'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions