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

Nhits weight argument fix in TimeSeriesDataSet #1432

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

manitadayon
Copy link

@manitadayon manitadayon commented Nov 6, 2023

Adding a weight argument to TimeSeriesDataSet will cause the trainer to throw an error for NhiTS because of a dimension mismatch in dimension 1.
This is because of unsqueeze operation and it is not solely because of missing values (the error will happen even when there is no missing values).
To fix this we can remove the unsqueeze(-1) and multiply the losses and weight directly.
(Ignore the first few commits as they are for NHitS encode-decoder length which is already merged to main)
This is the commit: (**Remove Unsqueeze operation to solve the mismatch operation)

I confirm this by running the same NhiTS model with weight operation set:

Issues:
#1431
#1040

NhiTS covariate fix
NHiTS covariate fix
NhiTS covariate Change
NHitS Covariate fix unit test
NHiTS covariate change test
Remove Additional property line
…into Nhits_weight_support

This is to add a support for weight argument in case of NhiTS model
@manitadayon manitadayon marked this pull request as draft November 6, 2023 03:44
@manitadayon manitadayon marked this pull request as ready for review November 6, 2023 03:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant