mlforecast
mlforecast copied to clipboard
AutoMLForecast .fit() method does not work when id_col != "unique_id" or target_col != 'y' due to defaults
What happened + What you expected to happen
Tried fitting AutoMLForecast with a series that has different id_col and getting an error saying "unique_id" not found. Problem is that id_col
isn't being passed into smape
https://github.com/Nixtla/mlforecast/blob/main/mlforecast/auto.py#L515
workaround for now is to just name my column as unique_id
.
Versions / Dependencies
mlforecast.__version__ = '0.13.5'
Reproduction script
from mlforecast.auto import AutoMLForecast, AutoLightGBM
from statsforecast.utils import generate_series
series = generate_series(n_series=10, seed=1)
fcst = AutoMLForecast(
models = [AutoLightGBM()],
freq='D',
season_length=7
)
fcst.fit(series, num_samples=2, n_windows=1, h=7)
series.columns = ['org', 'time' , 'target']
fcst.fit(
series,
id_col='org',
time_col='time',
target_col='target',
num_samples=2,
n_windows=1,
h=7
)
Issue Severity
Medium: It is a significant difficulty but I can work around it.