awslabs / gluonts

Probabilistic time series modeling in Python
https://ts.gluon.ai
Apache License 2.0
4.57k stars 750 forks source link

Regarding ModuleNotFoundError: No module named 'gluonts.distribution' #1575

Closed wenouyang closed 3 years ago

wenouyang commented 3 years ago

When trying to import distribution as

`from gluonts.distribution.neg_binomial import NegativeBinomialOutput

` The following error message is generated

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-13-21482f50f8f5> in <module>
----> 1 from gluonts.distribution.neg_binomial import NegativeBinomialOutput

ModuleNotFoundError: No module named 'gluonts.distribution'

from gluonts.distribution.neg_binomial import NegativeBinomialOutput
from gluonts.model.deepar import DeepAREstimator
lostella commented 3 years ago

@wenouyang where did you find such an import path? You should be doing

from gluonts.mx.distribution.neg_binomial import NegativeBinomialOutput
wenouyang commented 3 years ago

@lostella , thanks for the response, I was trying to test the code listed here https://www.kaggle.com/steverab/m5-forecasting-competition-gluonts-template

Is that due to the version update of Gluonts? Thanks.

wenouyang commented 3 years ago

The issue is solved.

lostella commented 3 years ago

Is that due to the version update of Gluonts? Thanks.

Yes, exactly, there has been some reorganization of the package structure, sorry for the inconvenience :-)

This came with the 0.7.0 release, see the notes You can also check #1183 to see exactly what moved where

AbhayGoyal commented 1 year ago

hi, I am still getting this issue, what is the correct path for it?

Dittonal commented 1 year ago

maybe try python3.7