unit8co / darts

A python library for user-friendly forecasting and anomaly detection on time series.
https://unit8co.github.io/darts/
Apache License 2.0
7.91k stars 858 forks source link

[BUG] Import NBeats model throws error #1784

Closed pmudgal-Intel closed 1 year ago

pmudgal-Intel commented 1 year ago

Describe the bug A clear and concise description of what the bug is. While importing NBeats model, it keeps showing the below error from darts.models import NBEATSModel python version - 3.7 darts- 0.24

6 from typing import Any, Dict, Optional, Sequence, Tuple, Union 7 ----> 8 import pytorch_lightning as pl 9 import torch 10 import torch.nn as nn ... ---> 50 raise Exception("Could not deserialize ATN with version " + str(version) + " (expected " + str(SERIALIZED_VERSION) + ").") 51 52 def readATN(self):

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

To Reproduce Steps to reproduce the behavior, preferably code snippet. from darts.models import NBEATSModel

Expected behavior A clear and concise description of what you expected to happen. Import should be successful

System (please complete the following information):

Additional context Add any other context about the problem here.

madtoinou commented 1 year ago

Hi, Pytorch and Pytorch Lightning do not support Python 3.7 in their latest version, could you please try to create a new environment with Python 3.9 or above, reinstall darts and see if it solves the import problem?

madtoinou commented 1 year ago

Closing this for now, @pmudgal-Intel feel free to reopen if the problem persists.