Skip to content

[ENH] Implement RecurrentNetwork (RNN) in v2 interface - #2381

Open
Dev10-sys wants to merge 2 commits into
sktime:mainfrom
Dev10-sys:feature/rnn-v2
Open

[ENH] Implement RecurrentNetwork (RNN) in v2 interface#2381
Dev10-sys wants to merge 2 commits into
sktime:mainfrom
Dev10-sys:feature/rnn-v2

Conversation

@Dev10-sys

@Dev10-sys Dev10-sys commented Aug 16, 2026

Copy link
Copy Markdown

Reference Issues/PRs

Partially addresses #1736 and #1992.

What does this implement/fix? Explain your changes.

Adds a v2 implementation of RecurrentNetwork (RNN/LSTM/GRU) as RecurrentNetwork_v2.

  • Implemented RecurrentNetwork_v2 inheriting from BaseModel supporting LSTM and GRU cell types.
  • Inputs (target_past, encoder_cont) derived directly from DataModule metadata.
  • Implemented RecurrentNetwork_pkg_v2 inheriting from Base_pkg with estimator tags and parameter fixtures.
  • Added unit and estimator compliance tests in tests/test_models/test_rnn_v2.py.

What should a reviewer concentrate their feedback on?

  • Feature tensor extraction in RecurrentNetwork_v2._build_input_tensor
  • Package tags and parameter fixtures in RecurrentNetwork_pkg_v2

Did you add any tests for the change?

  • Added tests/test_models/test_rnn_v2.py with check_estimator compliance and forward pass tests.

PR checklist

  • Title starts with [ENH]
  • Added tests (tests/test_models/test_rnn_v2.py)
  • Used pre-commit hooks

@codecov

codecov Bot commented Aug 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.77108% with 6 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (main@062aeb4). Learn more about missing BASE report.

Files with missing lines Patch % Lines
pytorch_forecasting/models/rnn/_rnn_v2.py 89.28% 6 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2381   +/-   ##
=======================================
  Coverage        ?   88.16%           
=======================================
  Files           ?      198           
  Lines           ?    11132           
  Branches        ?        0           
=======================================
  Hits            ?     9814           
  Misses          ?     1318           
  Partials        ?        0           
Flag Coverage Δ
cpu 88.16% <92.77%> (?)
pytest 88.16% <92.77%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant