Common issues and answers. Other places to seek help from:
PyTorch Lightning documentation and issues
PyTorch documentation and issues
How do I create a dataset for new samples?
TimeSeriesDataSetmethod of your training dataset to create datasets on which you can run inference.
How long should the encoder and decoder/prediction length be?
Choose something reasonably long, but not much longer than 500 for the encoder length and 200 for the decoder length. Consider that longer lengths increase the time it takes for your model to train.
The ratio of decoder and encoder length depends on the used alogrithm. Look at documentation to get clues.
It takes very long to create the dataset. Why is that?
If you set
allow_missing_timesteps=Truein your dataset, the creation of an index might take far more time as all missing values in the timeseries have to be identified. The algorithm might be possible to speed up but currently, it might be faster for you to not allow missing values and fill them yourself.
How are missing values treated?
Missing values between time points are either filled up with a fill forward or a constant fill-in strategy
Missing values indicated by NaNs are a problem and should be filled in up-front, e.g. with the median value and another missing indicator categorical variable.
Missing values in the future (out of range) are not filled in and simply not predicted. You have to provide values into the future. If those values are amongst the unknown future values, they will simply be ignored.
My training seems to freeze - nothing seem to be happening although my CPU/GPU is working at 100%. How to fix this issue?
Probably, your model is too big (check the number of parameters with
model.size()or the dataset encoder and decoder length are unrealistically large. See How long should the encoder and decoder/prediction length be?
Why does the learning rate finder not finish?
First, ensure that the trainer does not have the keword
limit_train_batches=...set. Second, use a target normalizer in your training dataset. Third, increase the
early_stop_thresholdargument of the
lr_findmethod to a large number.
Why do I get lots of matplotlib warnings when running the learning rate finder?
This is because you keep on creating plots for logging but without a logger. Set
log_interval=-1in your model to avoid this behaviour.
How do I choose hyperparameters?
Consult the model documentation to understand which parameters are important and which ranges are reasonable. Choose the learning rate with the learning rate finder. To tune hyperparameters, the optuna package is a great place to start with.