From 883da58f14d35213c2b16e0c371c8000236cdb54 Mon Sep 17 00:00:00 2001 From: Kashif Rasul Date: Wed, 23 Dec 2020 11:49:55 +0100 Subject: [PATCH] updated README --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 443442c..70904af 100644 --- a/README.md +++ b/README.md @@ -17,10 +17,11 @@ import matplotlib.pyplot as plt import pandas as pd import torch -from pts.dataset import ListDataset +from gluonts.dataset.common import ListDataset +from gluonts.dataset.util import to_pandas + from pts.model.deepar import DeepAREstimator from pts import Trainer -from pts.dataset import to_pandas ``` This simple example illustrates how to train a model on some data, and then use it to make predictions. As a first step, we need to collect some data: in this example we will use the volume of tweets mentioning the AMZN ticker symbol. @@ -62,7 +63,7 @@ estimator = DeepAREstimator(freq="5min", input_size=43, trainer=Trainer(epochs=10, device=device)) -predictor = estimator.train(training_data=training_data) +predictor = estimator.train(training_data=training_data, num_workers=4, num_prefetch=2) ``` ``` 45it [00:01, 37.60it/s, avg_epoch_loss=4.64, epoch=0]