Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AutoSklearnRegressor never return after fit() #1648

Open
xieleo5 opened this issue Mar 13, 2023 · 2 comments
Open

AutoSklearnRegressor never return after fit() #1648

xieleo5 opened this issue Mar 13, 2023 · 2 comments

Comments

@xieleo5
Copy link

xieleo5 commented Mar 13, 2023

Describe the bug

After the regressor search for 60 seconds, it just get stuck and never return. It even does not generate the "trajectory.json" under smac3-output. I guess there may be some bugs on SMAC side.

To Reproduce

import openml
from autosklearn.classification import AutoSklearnClassifier

task = openml.tasks.get_task(233211)
X, y = task.get_X_and_y("dataframe")

X_train, X_test, y_train, y_test = sklearn.model_selection.train_test_split(
    X, y, random_state=42
)

askl_config = {
    "time_left_for_this_task": 60,
}

automl = AutoSklearnClassifier(**askl_config)
automl.fit(X_train, y_train)
# it never reaches lines after

Expected behavior

It should stop after time up.

Actual behavior, stacktrace or logfile

Got stuck, never return from fit(), I have waited for 2 hours but it still doesn't return.

Environment and installation:

Please give details about your installation:

  • OS: Windows 11 WSL2
  • Is your installation in a virtual environment or conda environment? Conda env
  • Python version 3.10.9
  • Auto-sklearn version latest development branch
@aron-bram
Copy link
Collaborator

aron-bram commented Apr 17, 2023

Hi,
The openml dataset that you are running the automl classifier on is actually a supervised regression problem. Please try using AutoSklearnRegressor instead.

Example:

from autosklearn.estimators import AutoSklearnRegressor
import openml
from autosklearn.classification import AutoSklearnClassifier
import sklearn

task = openml.tasks.get_task(233211)

X, y = task.get_X_and_y("dataframe")

X_train, X_test, y_train, y_test = sklearn.model_selection.train_test_split(
    X, y, random_state=42
)

askl_config = {
    "time_left_for_this_task": 120,
    "delete_tmp_folder_after_terminate": False,  # good to have as False, in case we need to debug later
    "tmp_folder": "/tmp/auto-sklearn_run_DEBUG",  # change the path of the output folder to your liking
}

automl = AutoSklearnRegressor(
    **askl_config,
)
automl.fit(X_train, y_train)

print(automl.show_models())
# reached this point successfully

I think a memory out error might have caused the crash, since autosklearn seems to still forecfully try to fit the data with classifiers and uses immense amount of memory while doing so. It doesn't crash on my system, but I'm not using Windows with WSL2 like you do.

Let me know if it resolves your problem. Also, I apologize for the late answer.

@whoisltd
Copy link

i have same problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants