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

[Loss] Tweedie DistributionLoss not working #1159

Open
Antoine-Schwartz opened this issue Sep 27, 2024 · 1 comment · May be fixed by #1164
Open

[Loss] Tweedie DistributionLoss not working #1159

Antoine-Schwartz opened this issue Sep 27, 2024 · 1 comment · May be fixed by #1164
Assignees
Labels

Comments

@Antoine-Schwartz
Copy link

What happened + What you expected to happen

I get an error during the fit with the Tweedie DistributionLoss.
It seems that at the first step, 1) the loss is NaN, and 2) the output doesn't respect the correct typing.

Versions / Dependencies

Databricks Runtime : 14.3 LTS ML

  • pip install neuralforecast==1.7.5

Reproduction script

from neuralforecast import NeuralForecast
from neuralforecast.models import NHITS
from neuralforecast.losses.pytorch import DistributionLoss
from neuralforecast.utils import AirPassengersPanel

Y_df = AirPassengersPanel

nf = NeuralForecast(
    models=[
        NHITS(
            h=12,
            input_size=48,
            max_steps=100,
            scaler_type=None,
            loss=DistributionLoss('Tweedie', rho=1.5, validate_args=False),
            enable_model_summary=False,
            enable_checkpointing=False,
            logger=False
        )
    ],
    freq="M"
).fit(Y_df)

Issue Severity

Medium: It is a significant difficulty but I can work around it.

@elephaint elephaint self-assigned this Sep 27, 2024
@elephaint elephaint linked a pull request Sep 30, 2024 that will close this issue
@elephaint elephaint linked a pull request Sep 30, 2024 that will close this issue
@elephaint
Copy link
Contributor

Thanks for using NF!

I've PR'd a fix for this issue (#1164)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants