-
Notifications
You must be signed in to change notification settings - Fork 354
Open
Description
On plotting DeepAR predictions with plotly with time_series_prev enabled, the figure is not plotted.
Error
Sizes of tensors must match except in dimension 2. Expected size 95 but got size 37016 for tensor number 1 in the list.
To Reproduce
# Prepare test data
test_ts = TimeSeries.from_pd(test_df)
params = {'max_forecast_steps': 32,'n_past': 96, 'use_gpu': True}
if "max_forecast_steps" in params and params["max_forecast_steps"] is not None:
n = min(len(test_ts) - 1, int(params["max_forecast_steps"]))
test_ts, _ = test_ts.bisect(t=test_ts.time_stamps[n])
# Forecast
test_pred, test_err = model.forecast(time_stamps=test_ts.time_stamps, exog_data=exog_ts)
test_metrics = compute_metrics(evaluator, test_ts, test_pred)
# Draw prediction
figure = model.plot_forecast_plotly(
time_series=test_ts, time_series_prev=train_ts, exog_data=exog_ts, plot_forecast_uncertainty=True
)
figure.update_layout(width=None, height=500)
Device
- Colab Notebook
- Merlion Version 2.0.2
Additional context
On removing the time_series_prev param the plot is drawn. The same code works for other DL models.
Metadata
Metadata
Assignees
Labels
No labels