Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import error in pts module: gluonts/nursery/robust-mts-attack/pts/modules/distribution_output.py #3193

Open
ClaraGrthns opened this issue Jun 14, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@ClaraGrthns
Copy link
Contributor

Description

There is an Import error in the pts module in gluonts/nursery/robust-mts-attack/pts/modules/distribution_output.py

To Reproduce

The following lines of code yield the Import Error:

from gluonts.torch.modules.distribution_output import (
    DistributionOutput,
    LambdaLayer,
    PtArgProj,
)

Error message or code output

Traceback (most recent call last):
  File "gluonts/src/gluonts/nursery/robust-mts-attack/pts/modules/distribution_output.py", line 47, in <module>
    from gluonts.torch.modules.distribution_output import (
ModuleNotFoundError: No module named 'gluonts.torch.modules.distribution_output'

Proposed Solution:

The following lines of code should solve the problem to match the current version of gluonts (v 0.15.0).

from gluonts.torch.distributions.distribution_output import DistributionOutput
from gluonts.torch.modules.lambda_layer import LambdaLayer
from gluonts.torch.distributions.output import PtArgProj

Environment

  • Operating system: MacOS 14.0
  • Python version: 3.11.
  • GluonTS version: 0.15.0
@ClaraGrthns ClaraGrthns added the bug Something isn't working label Jun 14, 2024
lostella added a commit that referenced this issue Jun 14, 2024
*Issue #, if available:* #3193

*Description of changes:* Import Error solved with updated imports
matching the new version of gluonts


By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.


Tag: bug fix (import error)

Co-authored-by: Clara Grotehans <ClaraGrthns>
Co-authored-by: Lorenzo Stella <[email protected]>
kashif pushed a commit to kashif/gluon-ts that referenced this issue Jun 15, 2024
*Issue #, if available:* awslabs#3193

*Description of changes:* Import Error solved with updated imports
matching the new version of gluonts


By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.


Tag: bug fix (import error)

Co-authored-by: Clara Grotehans <ClaraGrthns>
Co-authored-by: Lorenzo Stella <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant