Chronos: make roll=True the default value for to_torch_data_loader (#5605)
This commit is contained in:
parent
2f1f3ba114
commit
01ec6107f8
2 changed files with 4 additions and 4 deletions
|
|
@ -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()"
|
||||
|
|
@ -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()"
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue