[DOC] Add RecurrentNetwork usage example - #2397
Conversation
|
@phoeenniixx Can you kindly review the PR if there is any issue let me know about it. Thanks. |
- Add doctest example showing complete workflow: data -> dataset -> model -> train -> predict - Uses generate_ar_data for self-contained example - Includes target_lags demonstration for RNN Fixes sktime#2377
ab8e2f4 to
70e4873
Compare
phoeenniixx
left a comment
There was a problem hiding this comment.
Thanks!
The code quality is failing, can you please look into this?
See the coding standards here: https://www.sktime.net/docs/developer-guide/coding-standards/
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2397 +/- ##
=======================================
Coverage ? 88.12%
=======================================
Files ? 196
Lines ? 11051
Branches ? 0
=======================================
Hits ? 9739
Misses ? 1312
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:
|
| logging_metrics (nn.ModuleList, optional): Metrics to log during training. | ||
| Defaults to nn.ModuleList([SMAPE(), MAE(), RMSE(), MAPE(), MASE()]). | ||
|
|
||
| Example: |
There was a problem hiding this comment.
THis should be like this:
Example
-------------
phoeenniixx
left a comment
There was a problem hiding this comment.
I think the heading is not right, can you please use numpydoc style docstrings
Reference Issues/PRs
Regarding #2377
What does this implement/fix? Explain your changes.
Add a doctest-style usage example to the
RecurrentNetwork(RNN) model class docstring. The example demonstrates the complete workflow:generate_ar_dataTimeSeriesDataSetwithtarget_lags(RNN-specific feature)RecurrentNetwork.from_dataset()TrainerWhat should a reviewer concentrate their feedback on?
Did you add any tests for the change?
Yes - the example itself is an executable doctest. It will be run by the existing doctest suite (
pytorch_forecasting/tests/test_doctest.py).Any other comments?
The example uses
generate_ar_datafor a self-contained, reproducible example without external dependencies. Training and prediction steps are marked with# doctest: +SKIPsince they require GPU/longer runtime.PR checklist
pre-commit install. To run hooks independent of commit, executepre-commit run --all-files