optuna/optuna-examples

Do we specify `parser='auto'` argument in `sklearn.dataset.fetch_openml` to remove warning messages?

nzw0301 opened this issue · 1 comments

Motivation

Since sklearn v1.2, which was released Dec. 2022, sklearn.dataset.fetch_openml has a new argument parser. Due to its "temporal" default value: parser='warn', a number of examples show warning messages like

/Users/nzw/.pyenv/versions/3.11.1/lib/python3.11/site-packages/sklearn/datasets/_openml.py:932: FutureWarning: The default value of `parser` will change from `'liac-arff'` to `'auto'` in 1.4. You can set `parser='auto'` to silence this warning. Therefore, an `ImportError` will be raised from 1.4 if the dataset is dense and pandas is not installed. Note that the pandas parser may return different data types. See the Notes Section in fetch_openml's API doc for details.

for every call fetch_openml.

Description

Considering the backwards compatibility, personally, I prefer not to work on this issue, but as a record, I made this issue.

The scikit-learn v1.4 will change its default value to 'auto' so we can ignore warnings and wait for the release of v1.4. In this case, we can close this issue without sending any PR.

Alternatives (optional)

If we would like to disable these warnings, we need to specify parser='auto' in

  • ./visualization/plot_study.ipynb
  • ./visualization/plot_study.py
  • ./hiplot/plot_study.ipynb
  • ./pytorch/skorch_simple.py

I'm not sure this example repo cares about backward compatibility; we might need to add scikit-learn>=1.2 to their requirements.txt or work on this issue after a few months when users widely install scikit-learn>=1.2 for their machine.

Additional context (optional)

This issue has not seen any recent activity.