Skip to content

[ENH] softs_v2 Model added#2232

Open
Muhammad-Rebaal wants to merge 10 commits into
sktime:mainfrom
Muhammad-Rebaal:softs_model
Open

[ENH] softs_v2 Model added#2232
Muhammad-Rebaal wants to merge 10 commits into
sktime:mainfrom
Muhammad-Rebaal:softs_model

Conversation

@Muhammad-Rebaal
Copy link
Copy Markdown
Contributor

@Muhammad-Rebaal Muhammad-Rebaal commented Mar 25, 2026

Referencing #2231

Hi @fkiraly , @phoeenniixx, @PranavBhatP !

I have implemented the SOFTS (Star Aggregate-Dispatch for Time Series Forecasting) model within the PyTorch Forecasting v2 architecture.

Could you please review the PR?

Here is a summary of the changes made:

  • Isolated Layer Abstraction (pytorch_forecasting/layers/_blocks/_softs_block.py): Implemented the core neural network components, specifically the novel STADModule (Star Aggregate-Dispatch mechanism) and the SoftsEncoderLayer, completely isolated from the base estimating logic to strictly adhere to the project's v2 architectural standards.
  • Model Construction (pytorch_forecasting/models/softs/): Created the main Softs estimator wrapper which inherits from TslibBaseModel. It effectively handles dynamic feature input alignments (history_cont and history_target), optionally applies RevIN scaling, and routes the forward pass through the STAD-based encoders.
  • V2 Package Management (_softs_pkg_v2.py): Established the Softs_pkg_v2 class representing model metadata (capability tags, compute requirements) and defined automated testing configurations (get_test_train_params) tightly integrated with the underlying TslibDataModule.
  • Registry & Exports: Updated the relevant __init__.py files across the layers and models directories to properly expose Softs, Softs_pkg_v2, and the STAD blocks to the broader PyTorch Forecasting ecosystem.

Thank you!

@Muhammad-Rebaal Muhammad-Rebaal marked this pull request as draft March 25, 2026 17:49
@Muhammad-Rebaal Muhammad-Rebaal marked this pull request as ready for review March 25, 2026 18:41
@Muhammad-Rebaal Muhammad-Rebaal marked this pull request as draft March 25, 2026 19:23
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 9, 2026

Codecov Report

❌ Patch coverage is 82.35294% with 24 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (main@44e3ef2). Learn more about missing BASE report.

Files with missing lines Patch % Lines
pytorch_forecasting/models/softs/_softs_pkg_v2.py 51.28% 19 Missing ⚠️
pytorch_forecasting/models/softs/_softs_v2.py 91.80% 5 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2232   +/-   ##
=======================================
  Coverage        ?   86.95%           
=======================================
  Files           ?      170           
  Lines           ?     9900           
  Branches        ?        0           
=======================================
  Hits            ?     8609           
  Misses          ?     1291           
  Partials        ?        0           
Flag Coverage Δ
cpu 86.95% <82.35%> (?)
pytest 86.95% <82.35%> (?)

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.

@Muhammad-Rebaal Muhammad-Rebaal marked this pull request as ready for review April 29, 2026 19:19
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