PacktPublishing / Modern-Time-Series-Forecasting-with-Python

Modern Time Series Forecasting with Python, published by Packt
MIT License
453 stars 227 forks source link

Chapter 4- 02-Baseline Forecasts using darts #41

Open taimoorkh opened 6 months ago

taimoorkh commented 6 months ago

I am unable to import Naive Moving Average as i run the following code from src.forecasting.baselines import NaiveMovingAverage

I am getting the following error:

ImportError Traceback (most recent call last) Cell In[25], line 1 ----> 1 from src.forecasting.baselines import NaiveMovingAverage

File ~\OneDrive\Desktop\thesis\book_reading\Modern-Time-Series-Forecasting\src\forecasting\baselines.py:2 1 import numpy as np ----> 2 from darts.models.forecasting.forecasting_model import LocalForecastingModel 3 from darts import TimeSeries 6 class NaiveMovingAverage(LocalForecastingModel):

ImportError: cannot import name 'LocalForecastingModel' from 'darts.models.forecasting.forecasting_model'

manujosephv commented 2 months ago

Was having some deep integration with Darts API. that must have changed. Anyways, we are working on a second edition and updating the code for that. In 2nd edition, we have moved away from darts and chosen statsforecast from Nixtla. Maybe an older version of Darts library (maybe something that was released a year bac) may work?