-
Notifications
You must be signed in to change notification settings - Fork 697
[ENH] Add Tide
to test framework of ptf-v2
#1889
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
base: main
Are you sure you want to change the base?
Conversation
@agobbifbk, @fkiraly, I think this PR is ready for review ( I tried to keep the code almost same as tide in dsipts) |
(still need to add docstrings, the current docstrings are also copied from dsipts, I will add them today as well) |
then please click the button "ready for review" (below), I almost did not see this |
Here I have some doubts: are you sure all the keys are in the batch dict:
This is has not been tested, for example here (
|
Yes, The data i am using, doesnot pass any categoricals:
|
Ok, I see. Even though there is the key in the dict there is no category to loop on. It should work :-) |
exactly :) |
@@ -430,8 +430,8 @@ def __getitem__(self, idx): | |||
encoder_indices = slice(start_idx, start_idx + enc_length) | |||
decoder_indices = slice(start_idx + enc_length, end_idx) | |||
|
|||
target_scale = data["target"][encoder_indices] | |||
target_scale = target_scale[~torch.isnan(target_scale)].abs().mean() | |||
target_past = data["target"][encoder_indices] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are we doing this? This seems like a significant change to the internal contract of TimeSeriesDataSet
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We discussed it some months back, that there was no target_past
in EncoderDecoderDataModule
and some models do require it. TSLibDataModule
already implements it as history_target
(see here). Tide
also needs it, and we were already calculating target_past
for the target_scale
, so I just renamed the variable and added it to the return
(if you see line 509, we are still returning target_scale
as well)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- see above, it seems like there is a significant change to
EncoderDecoderTimeSeriesDataModule
in terms of the dict return. Thetarget_scale
variable might not be assigned, and its source is being changed. Can you please explain? - Can you add the new layers in folders sorted by type of layer rather than by name of dependency (dsipts)?
Adds
Tide
model fromdsipts
toptf-v2
Created a new folder
tide_dsipts
intide
that contains all the necessary parts for the tide