awslabs / gluonts

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

ModuleNotFoundError: No module named 'gluonts.torch.modules.loss' #3184

Open melty-chocolate opened 1 month ago

melty-chocolate commented 1 month ago

Description

gluonts 0.15.0 introduces error ModuleNotFoundError: No module named 'gluonts.torch.modules.loss' downgrade to 0.14 fixed this

To Reproduce

(Please provide minimal example of code snippet that reproduces the error. For existing examples, please provide link.)

from gluonts.torch.modules.loss import DistributionLoss

Error message or code output

(Paste the complete error message, including stack trace, or the undesired output that the above snippet produces.)

ModuleNotFoundError: No module named 'gluonts.torch.modules.loss'

Environment

(Add as much information about your environment as possible, e.g. dependencies versions.)

lostella commented 1 month ago

Hi, this is not a bug, but a breaking change listed in the release notes. It was introduced in #3093. The methods implementing negative log-likelihood as loss associated with parametric distributions were moved into gluonts.torch.distributions.distribution_output, bundled together with the class providing layers to project latent states into the parameter space for the distribution family. cc @shchur