[DOC] Add DeepAR and NBeats usage examples - #2378
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2378 +/- ##
=======================================
Coverage ? 87.46%
=======================================
Files ? 175
Lines ? 10165
Branches ? 0
=======================================
Hits ? 8891
Misses ? 1274
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
phoeenniixx
left a comment
There was a problem hiding this comment.
Thanks!
Can you please use dataset and show the complete flow of the model training and prediction in the example?
|
I expanded both model docstrings into runnable end-to-end examples using the built-in autoregressive dataset. Each now creates a The examples are in commit |
phoeenniixx
left a comment
There was a problem hiding this comment.
The code quality is still failing. Also, in place of adding a complete code block, can you add it command-wise? Using >>>? The doctests check >>> and not the code block
Summary
This adds focused doctest-style usage examples for the v1
DeepARandNBeatsmodels and their package containers.The model examples show the supported
from_datasetentry point and link to the complete tutorials or example script. The package examples document the container-to-model resolution used by the estimator suite.This is intentionally limited to two v1 models, as requested in issue #2377. The remaining models can follow in separate small pull requests.
Validation
python -m ruff check pytorch_forecasting/models/deepar/_deepar.py pytorch_forecasting/models/deepar/_deepar_pkg.py pytorch_forecasting/models/nbeats/_nbeats.py pytorch_forecasting/models/nbeats/_nbeats_pkg.pypassed.python -m compileall -qpassed for the four changed files.git diff --checkpassed.lightningdependency is not installed.Closes #2377 for the DeepAR and NBeats slice.