From 911700d740e2f610361bb81ac371abfb75c339bb Mon Sep 17 00:00:00 2001 From: eugeniomercuriali Date: Sat, 26 Oct 2024 17:06:41 +0200 Subject: [PATCH] fix: adjusted building notebook --- docs/source/tutorials/building.ipynb | 52 ++++++++++++++-------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/docs/source/tutorials/building.ipynb b/docs/source/tutorials/building.ipynb index 2910bf87..3b37c048 100644 --- a/docs/source/tutorials/building.ipynb +++ b/docs/source/tutorials/building.ipynb @@ -875,13 +875,13 @@ " assert dataset.max_prediction_length == dataset.min_prediction_length, \"Decoder only supports a fixed length\"\n", " assert dataset.min_encoder_length == dataset.max_encoder_length, \"Encoder only supports a fixed length\"\n", " assert (\n", - " len(dataset.time_varying_known_categoricals) == 0\n", - " and len(dataset.time_varying_known_reals) == 0\n", - " and len(dataset.time_varying_unknown_categoricals) == 0\n", - " and len(dataset.static_categoricals) == 0\n", - " and len(dataset.static_reals) == 0\n", - " and len(dataset.time_varying_unknown_reals) == 1\n", - " and dataset.time_varying_unknown_reals[0] == dataset.target\n", + " len(dataset._time_varying_known_categoricals) == 0\n", + " and len(dataset._time_varying_known_reals) == 0\n", + " and len(dataset._time_varying_unknown_categoricals) == 0\n", + " and len(dataset._static_categoricals) == 0\n", + " and len(dataset._static_reals) == 0\n", + " and len(dataset._time_varying_unknown_reals) == 1\n", + " and dataset._time_varying_unknown_reals[0] == dataset.target\n", " ), \"Only covariate should be the target in 'time_varying_unknown_reals'\"\n", "\n", " return super().from_dataset(dataset, **new_kwargs)" @@ -1587,12 +1587,12 @@ " assert dataset.max_prediction_length == dataset.min_prediction_length, \"Decoder only supports a fixed length\"\n", " assert dataset.min_encoder_length == dataset.max_encoder_length, \"Encoder only supports a fixed length\"\n", " assert (\n", - " len(dataset.time_varying_known_categoricals) == 0\n", - " and len(dataset.time_varying_known_reals) == 0\n", - " and len(dataset.time_varying_unknown_categoricals) == 0\n", - " and len(dataset.static_categoricals) == 0\n", - " and len(dataset.static_reals) == 0\n", - " and len(dataset.time_varying_unknown_reals) == 1\n", + " len(dataset._time_varying_known_categoricals) == 0\n", + " and len(dataset._time_varying_known_reals) == 0\n", + " and len(dataset._time_varying_unknown_categoricals) == 0\n", + " and len(dataset._static_categoricals) == 0\n", + " and len(dataset._static_reals) == 0\n", + " and len(dataset._time_varying_unknown_reals) == 1\n", " ), \"Only covariate should be in 'time_varying_unknown_reals'\"\n", "\n", " return super().from_dataset(dataset, **new_kwargs)\n", @@ -2136,12 +2136,12 @@ " assert dataset.max_prediction_length == dataset.min_prediction_length, \"Decoder only supports a fixed length\"\n", " assert dataset.min_encoder_length == dataset.max_encoder_length, \"Encoder only supports a fixed length\"\n", " assert (\n", - " len(dataset.time_varying_known_categoricals) == 0\n", - " and len(dataset.time_varying_known_reals) == 0\n", - " and len(dataset.time_varying_unknown_categoricals) == 0\n", - " and len(dataset.static_categoricals) == 0\n", - " and len(dataset.static_reals) == 0\n", - " and len(dataset.time_varying_unknown_reals)\n", + " len(dataset._time_varying_known_categoricals) == 0\n", + " and len(dataset._time_varying_known_reals) == 0\n", + " and len(dataset._time_varying_unknown_categoricals) == 0\n", + " and len(dataset._static_categoricals) == 0\n", + " and len(dataset._static_reals) == 0\n", + " and len(dataset._time_varying_unknown_reals)\n", " == len(dataset.target_names) # Expect as as many unknown reals as targets\n", " ), \"Only covariate should be in 'time_varying_unknown_reals'\"\n", "\n", @@ -3414,13 +3414,13 @@ " assert dataset.max_prediction_length == dataset.min_prediction_length, \"Decoder only supports a fixed length\"\n", " assert dataset.min_encoder_length == dataset.max_encoder_length, \"Encoder only supports a fixed length\"\n", " assert (\n", - " len(dataset.time_varying_known_categoricals) == 0\n", - " and len(dataset.time_varying_known_reals) == 0\n", - " and len(dataset.time_varying_unknown_categoricals) == 0\n", - " and len(dataset.static_categoricals) == 0\n", - " and len(dataset.static_reals) == 0\n", - " and len(dataset.time_varying_unknown_reals) == 1\n", - " and dataset.time_varying_unknown_reals[0] == dataset.target\n", + " len(dataset._time_varying_known_categoricals) == 0\n", + " and len(dataset._time_varying_known_reals) == 0\n", + " and len(dataset._time_varying_unknown_categoricals) == 0\n", + " and len(dataset._static_categoricals) == 0\n", + " and len(dataset._static_reals) == 0\n", + " and len(dataset._time_varying_unknown_reals) == 1\n", + " and dataset._time_varying_unknown_reals[0] == dataset.target\n", " ), \"Only covariate should be the target in 'time_varying_unknown_reals'\"\n", "\n", " return super().from_dataset(dataset, **new_kwargs)\n",