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

gluonts.torch.distributions.BinnedUniformsOutput raises AttributeError #3107

Open
Drewniacki opened this issue Jan 22, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@Drewniacki
Copy link

Description

Using BinnedUniformsOutput with DeepAREstimator raises AttributeError: 'list' object has no attribute 'shape'.

To Reproduce

model_params = {
    'prediction_length': pred_length,
    'freq': period.freqstr,
    'distr_output' : BinnedUniformsOutput(
                        bins_lower_bound = 0.0, 
                        bins_upper_bound = 1.0, 
                        num_bins=2),
}
model = DeepAREstimator(**model_params).train(train_ds)

Error message or code output

INFO: GPU available: False, used: False
INFO:lightning.pytorch.utilities.rank_zero:GPU available: False, used: False
INFO: TPU available: False, using: 0 TPU cores
INFO:lightning.pytorch.utilities.rank_zero:TPU available: False, using: 0 TPU cores
INFO: IPU available: False, using: 0 IPUs
INFO:lightning.pytorch.utilities.rank_zero:IPU available: False, using: 0 IPUs
INFO: HPU available: False, using: 0 HPUs
INFO:lightning.pytorch.utilities.rank_zero:HPU available: False, using: 0 HPUs
/usr/local/lib/python3.10/dist-packages/lightning/pytorch/trainer/configuration_validator.py:74: You defined a `validation_step` but have no `val_dataloader`. Skipping val loop.
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
[<ipython-input-173-9cdb9f00c907>](https://localhost:8080/#) in <cell line: 1>()
----> 1 model = DeepAREstimator(**model_params).train(train_ds)

21 frames
[/usr/local/lib/python3.10/dist-packages/gluonts/torch/distributions/binned_uniforms.py](https://localhost:8080/#) in __init__(self, bins_lower_bound, bins_upper_bound, logits, numb_bins, validate_args)
     53         )
     54         assert (
---> 55             logits.shape[-1] == numb_bins
     56         ), "The distribution requires one logit per bin."
     57 

AttributeError: 'list' object has no attribute 'shape'

Environment

  • Google Colab
  • Python version: python 3.10
  • GluonTS version: 0.14.3
  • MXNet version: 1.9.1
@Drewniacki Drewniacki added the bug Something isn't working label Jan 22, 2024
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