'PyTorch Forecasting Dataloader/TimeSeriesDataSet with two differently scaled DataFrames (by unix) as Input/Output

I am trying to apply pytorch_forecasting.TimeSeriesDataSet from PyTorch Forecasting. My difficulty is, that I have two differently scaled & shaped DataFrames as input and output data.

Simply put, my input_df looks like this:

    unix_timestamp[ms]         value_a         value_b
0        1609455600000               2               3 
1        1609455600010               2               4
2        1609455600020               4               5
3        1609455600030               6               6
...                ...             ...             ...

Where the unix_timestamp is a running integer in milliseconds and each row represents the value of a 10ms interval.

Whereas my output_df looks like this:

    unix_timestamp[ms]    target_value
0        1609455600000               9
1        1609455660000               8
2        1609455720000               7
3        1609455780000               6
...                ...             ... 

In this case, each row represents the value of a 1-minute interval!

Now I would like to use a time window of 10 minutes from the input_df (so 600000 ms and therefore 60000 rows) to predict 1 minute of the output_df (therefore 1 row).

How do I use pytorch_forecasting.TimeSeriesDataSet to prepare these two DataFrames this way?

Important Note: The unix_timestamp of the two DataFrames do not necessarily overlap like shown it the example above. So for instance, if the input_df has a timestamp of 1601596805783 which corresponds to the '2020-10-02T00:00:05.783', it does not mean that this exact timestamp exists in the output_df. It might be very close, but mostly not on point to the exact millisecond and off by a couple of milliseconds.

Editional Note: Thus far no-one could answer this question. I am still struggling with finding the correct way to use the TimeSeriesDataSet dataloader from PyTorch Forecasting. Are there any question to my question? Might be something explained not clear enough? Any kind of help is very welcome.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source