Skip to content

Commit

Permalink
Chronos: make roll=True the default value for to_torch_data_loader (
Browse files Browse the repository at this point in the history
  • Loading branch information
plusbang authored Sep 6, 2022
1 parent 2f1f3ba commit 01ec610
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
"train_data = tsdata_train\n",
"\n",
"# uncomment this line to change `train_data` as pytorch dataloader\n",
"# train_data = tsdata_train.to_torch_data_loader(roll=True, lookback=48, horizon=1)\n",
"# train_data = tsdata_train.to_torch_data_loader(lookback=48, horizon=1)\n",
"\n",
"# uncomment this line to change `train_data` as numpy ndarray\n",
"# train_data = tsdata_train.roll(lookback=48, horizon=1).to_numpy()"
Expand Down Expand Up @@ -185,7 +185,7 @@
"outputs": [],
"source": [
"# comment this line if you want to try other formats\n",
"val_data = tsdata_val.to_torch_data_loader(roll=True, lookback=48, horizon=1)\n",
"val_data = tsdata_val.to_torch_data_loader(lookback=48, horizon=1)\n",
"\n",
"# uncomment this line to change `val_data` as numpy ndarray\n",
"# val_data = tsdata_val.roll(lookback=48, horizon=1).to_numpy()"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,9 @@ Please refer to the API doc [`roll`](../../PythonAPI/Chronos/tsdataset.html#bigd
.. note::
**Difference between `roll` and `to_torch_data_loader`**:
`.roll(...)` performs the rolling before RR forecasters/auto models training while `.to_torch_data_loader(roll=True, ...)` performs rolling during the training.
`.roll(...)` performs the rolling before RR forecasters/auto models training while `.to_torch_data_loader(...)` performs rolling during the training.
It is fine to use either of them when you have a relatively small dataset (less than 1G). `.to_torch_data_loader(roll=True, ...)` is recommended when you have a large dataset (larger than 1G) to save memory usage.
It is fine to use either of them when you have a relatively small dataset (less than 1G). `.to_torch_data_loader(...)` is recommended when you have a large dataset (larger than 1G) to save memory usage.
```

```eval_rst
Expand Down

0 comments on commit 01ec610

Please sign in to comment.