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

[BUG] AssertionError: target None has to be real #1759

Open
ZHUGUODONG1 opened this issue Jan 25, 2025 · 1 comment
Open

[BUG] AssertionError: target None has to be real #1759

ZHUGUODONG1 opened this issue Jan 25, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@ZHUGUODONG1
Copy link

D:\Qgis\apps\Python312\Lib\site-packages\pytorch_lightning\utilities\parsing.py:269: UserWarning: Attribute 'loss' is an instance of nn.Module and is already saved during checkpointing. It is recommended to ignore them using self.save_hyperparameters(ignore=['loss']).
rank_zero_warn(
D:\Qgis\apps\Python312\Lib\site-packages\pytorch_lightning\utilities\parsing.py:269: UserWarning: Attribute 'logging_metrics' is an instance of nn.Module and is already saved during checkpointing. It is recommended to ignore them using self.save_hyperparameters(ignore=['logging_metrics']).
rank_zero_warn(
Traceback (most recent call last):
File "D:\我的下载\betterbatch-main\test.py", line 276, in
model = BatchDeepAREstimator()
^^^^^^^^^^^^^^^^^^^^^^
File "D:\我的下载\betterbatch-main\test.py", line 42, in init
super().init(**kwargs)
File "D:\我的下载\betterbatch-main\pytorch_forecasting\models\deepar_init_.py", line 140, in init
targeti in time_varying_reals_encoder
AssertionError: target None has to be real

@ZHUGUODONG1 ZHUGUODONG1 added the bug Something isn't working label Jan 25, 2025
@github-project-automation github-project-automation bot moved this to Needs triage & validation in Bugfixing - pytorch-forecasting Jan 25, 2025
@Sohaib-Ahmed21
Copy link
Contributor

Sohaib-Ahmed21 commented Jan 27, 2025

@ZHUGUODONG1 can you provide the reproducible code?

FYI , in pytorch-forecasting models, target must be given and should be real as expected in time series forecasting problems.

@fkiraly fkiraly changed the title [BUG]AssertionError: target None has to be real [BUG] AssertionError: target None has to be real Feb 3, 2025
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
Status: Needs triage & validation
Development

No branches or pull requests

2 participants