sktime / pytorch-forecasting

Time series forecasting with PyTorch
https://pytorch-forecasting.readthedocs.io/
MIT License
4.01k stars 635 forks source link

Improving docs, examples, and tutorials of `pytorch-forecasting` #1718

Open julian-fong opened 3 days ago

julian-fong commented 3 days ago

This list is a quick bucket list of items that can be potentially improved from what I've seen in the docs.

As requested by @yarnabrina, we should create simple examples, reducing complexity of the library as much as possible, to encourage users who are not too familiar with pytorch-forecasting or time series machine learning in general to try out the library. I think for example, the 'Example' inside https://pytorch-forecasting.readthedocs.io/en/stable/getting-started.html# is way too complicated, and will deter users from using the library because it is too complex to understand and read through as a first time user.

Thus for now, I'm proposing we

I think these two items can improved in the following way:

  1. This first section will be the 'introduction' section, which will contain one extremely basic introductory tutorial with minimal code, featuring all the different modules (TimeSeriesDataset, different Models, Trainers, etc), but with little to no explanations. This basic tutorial is designed to essentially be a minimal walkthrough on how to use the library. The preceding tutorials will explain more in depth about each module. For example, we will have one tutorial explaining TimeSeriesDataset and so on.
  2. The second section will be "Modelling tutorials", where most of the autoregressive models or forecasting model tutorials will be located here. For example, this and this.
  3. The last section will be used for any other miscellaneous and additional tutorials, for example, this

I am also proposing that we split the directory that is used to load the data into a new directory inside the root folder named datasets. This folder will be the primarily method to load datasets for tutorials or for modelling purposes. To reduce duplication, we can just import loading methods from the sktime library.

This will allow us to keep the examples directory standalone, and the files inside will be used to code up simple functions and variables that can be used inside tutorials.

julian-fong commented 3 days ago

@fkiraly FYI

julian-fong commented 3 days ago

also, I need to figure out what Model.from_dataset() does, and why it is necessary for it to be called this way in order to do training. It seems pretty counterintuitive that we need to load the model using a dataset, but it also doesnt seem to serve any purpose as we are passing the dataloaders inside the trainer function..

madprogramer commented 2 days ago

Hi, I just saw this issue.

I just created PR https://github.com/sktime/pytorch-forecasting/pull/1720 on predict_mode/TimeSeriesDataset.from_dataset().

I think that is probably connected.