evalml icon indicating copy to clipboard operation
evalml copied to clipboard

AutoMLSearch fails if target column is IntegerNullable logical type

Open thehomebrewnerd opened this issue 3 years ago • 0 comments
trafficstars

Running automl.search() fails when the target column is an IntegerNullable logical type. This was discovered on a time series regression problem, but have not tested to see if this same error happens for other problem types. This should also be checked.

Code Sample, a copy-pastable example to reproduce your bug.

import pandas as pd
from evalml import AutoMLSearch

df = pd.read_csv("bike_sharing_demand_train_cleaned.csv", nrows=500)
df.ww.init(logical_types={"datetime": "Datetime", "count": "IntegerNullable"})

y = df.ww.pop("count")
X = df

problem_configuration={"gap": 0, "max_delay": 7, "forecast_horizon": 7, "time_index": "datetime"}
automl = AutoMLSearch(
    X,
    y,
    problem_type="time series regression",
    problem_configuration=problem_configuration,
)

automl.search()

Error on L386 of pipeline_base.py _score_all_objectives method:

Fold 0: Exception during automl search: Root Mean Squared Error encountered TypeError with message (loop of ufunc does not support argument 0 of type float which has no callable sqrt method):

thehomebrewnerd avatar Sep 29 '22 16:09 thehomebrewnerd