`.update()` not working: Hello I have the followi...
# mlforecast
a
.update()
not working: Hello I have the following example:
Copy code
from datasetsforecast.m4 import M4
import random

await M4.async_download('data', group='Hourly')
df, *_ = M4.load('data', 'Hourly')
uids = df['unique_id'].unique()
random.seed(0)
sample_uids = random.choices(uids, k=2)
df = df[df['unique_id'].isin(sample_uids)].reset_index(drop=True)
df['ds'] = df['ds'].astype('int64')


fcst = MLForecast(
    models=LGBMRegressor(),
    freq=1,
)

df_train_M4 = df[df["ds"] <= 1000]
fcst.fit(df_train_M4)
fcst.predict(4)
When I then hereafter try to use the update functionality I get `AttributeError: 'MLForecast' object has no attribute 'update'`:
Copy code
new_values = df[df["ds"] > 1000]
fcst.update(new_values)
Can anyone see what I'm doing wrong? I am using:
mlforecast.__version__ = '0.12.0'
j
Hey. This hasn't been released yet, however the update method is just a wrapper of the ts update method, so you can do
fcst.ts.update(new_values)
instead
a
I see - thanks a lot!