Nixtla / neuralforecast

Scalable and user friendly neural :brain: forecasting algorithms.
https://nixtlaverse.nixtla.io/neuralforecast
Apache License 2.0
2.98k stars 342 forks source link

"Could not deserialize ATN" exception #1043

Closed TDL77 closed 3 months ago

TDL77 commented 3 months ago

What happened + What you expected to happen

Exception Traceback (most recent call last) Cell In[9], line 10 3 from neuralforecast.utils import AirPassengersDF 5 nf = NeuralForecast( 6 models = [NBEATS(input_size=24, h=12, max_steps=100)], 7 freq = 'M' 8 ) ---> 10 nf.fit(df=AirPassengersDF) 11 nf.predict()

File ~/miniforge3/envs/statsforecast/lib/python3.10/site-packages/neuralforecast/core.py:462, in NeuralForecast.fit(self, df, static_df, val_size, sort_df, use_init_models, verbose, id_col, time_col, target_col, distributed_config) 459 self._reset_models() 461 for i, model in enumerate(self.models): --> 462 self.models[i] = model.fit( 463 self.dataset, val_size=val_size, distributed_config=distributed_config 464 ) 466 self._fitted = True

File ~/miniforge3/envs/statsforecast/lib/python3.10/site-packages/neuralforecast/common/_base_windows.py:651, in BaseWindows.fit(self, dataset, val_size, test_size, random_seed, distributed_config) 622 def fit( 623 self, 624 dataset, (...) 628 distributed_config=None, ... 48 version = self.readInt() 49 if version != SERIALIZED_VERSION: ---> 50 raise Exception("Could not deserialize ATN with version " + str(version) + " (expected " + str(SERIALIZED_VERSION) + ").")

Exception: Could not deserialize ATN with version  (expected 4).

Versions / Dependencies

name: statsforecast channels:

Reproduction script

from neuralforecast import NeuralForecast from neuralforecast.models import NBEATS from neuralforecast.utils import AirPassengersDF

nf = NeuralForecast( models = [NBEATS(input_size=24, h=12, max_steps=100)], freq = 'M' )

nf.fit(df=AirPassengersDF) nf.predict()

Issue Severity

None

thanhvodc commented 1 month ago

To resolve this problem, you only run pip uninstall omegaconf. Hope this helps.