Skip to content

Commit

Permalink
fix: adjusted building notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
eugenio-mercuriali committed Oct 26, 2024
1 parent 5eef698 commit 911700d
Showing 1 changed file with 26 additions and 26 deletions.
52 changes: 26 additions & 26 deletions docs/source/tutorials/building.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit 911700d

Please sign in to comment.