Skip to content

[ENH] Reformer forecaster added in ptf-v2#2089

Open
lucifer4073 wants to merge 4 commits intosktime:mainfrom
lucifer4073:reformer
Open

[ENH] Reformer forecaster added in ptf-v2#2089
lucifer4073 wants to merge 4 commits intosktime:mainfrom
lucifer4073:reformer

Conversation

@lucifer4073
Copy link
Contributor

@lucifer4073 lucifer4073 commented Feb 24, 2026

Reference Issues/PRs

Closes #2071.

What does this implement/fix? Explain your changes.

Integrates the Reformer forecaster into ptf-v2.

What should a reviewer concentrate their feedback on?

Check if the implementation technique is correct. There are 2 forecasting options long_term_forecast (default) and short_term_forecast.

Did you add any tests for the change?

Appropriate test parameters were added in reformer_pkg_v2.

PR checklist

  • The PR title starts with either [ENH], [MNT], [DOC], or [BUG]. [BUG] - bugfix, [MNT] - CI, test framework, [ENH] - adding or improving code, [DOC] - writing or improving documentation or docstrings.
  • Added/modified tests
  • Used pre-commit hooks when committing to ensure that code is compliant with hooks. Install hooks with pre-commit install.
    To run hooks independent of commit, execute pre-commit run --all-files

Copy link
Collaborator

@fkiraly fkiraly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

There is an incorrect import, please fix

@fkiraly fkiraly added enhancement New feature or request module:models labels Feb 24, 2026
@codecov
Copy link

codecov bot commented Feb 26, 2026

Codecov Report

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

Files with missing lines Patch % Lines
...ecasting/layers/_embeddings/_temporal_embedding.py 23.07% 30 Missing ⚠️
...orecasting/layers/_reformer/_lsh_self_attention.py 80.85% 27 Missing ⚠️
pytorch_forecasting/models/reformer/reformer_v2.py 75.94% 19 Missing ⚠️
pytorch_forecasting/layers/_reformer/_encoder.py 83.72% 7 Missing ⚠️
..._forecasting/layers/_embeddings/_data_embedding.py 95.65% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2089   +/-   ##
=======================================
  Coverage        ?   86.31%           
=======================================
  Files           ?      174           
  Lines           ?    10119           
  Branches        ?        0           
=======================================
  Hits            ?     8734           
  Misses          ?     1385           
  Partials        ?        0           
Flag Coverage Δ
cpu 86.31% <78.29%> (?)
pytest 86.31% <78.29%> (?)

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

☔ View full report in Codecov by Sentry.
📢 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.

Copy link
Contributor Author

@lucifer4073 lucifer4073 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have resolved the import related issues.
Thanks.

@lucifer4073 lucifer4073 requested a review from fkiraly March 4, 2026 14:59
@lucifer4073
Copy link
Contributor Author

Hi @PranavBhatP @phoeenniixx,

Could you please look into this ? It's been a week since I have updated the PR and all tests are passing.
Thanks.

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

Labels

enhancement New feature or request module:models

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ENH] Add v2 support for Reformer model

3 participants