Skip to content

[ENH] ModernTCN: A Modern Pure Convolution Structure for General Time Series Analysis added - #2363

Open
Muhammad-Rebaal wants to merge 7 commits into
sktime:mainfrom
Muhammad-Rebaal:modern_tcn
Open

[ENH] ModernTCN: A Modern Pure Convolution Structure for General Time Series Analysis added#2363
Muhammad-Rebaal wants to merge 7 commits into
sktime:mainfrom
Muhammad-Rebaal:modern_tcn

Conversation

@Muhammad-Rebaal

Copy link
Copy Markdown
Member

Fixes #2358

This PR introduces v2 interface support for ModernTCN (ICLR 2024), a highly efficient, pure convolutional time series forecasting model that leverages large-kernel depthwise convolutions and patching to achieve state-of-the-art performance.

Reference

@Muhammad-Rebaal
Muhammad-Rebaal marked this pull request as ready for review August 11, 2026 14:40
@codecov

codecov Bot commented Aug 11, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 99.42857% with 1 line in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (main@7bcf66c). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...ch_forecasting/models/modern_tcn/_modern_tcn_v2.py 98.38% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2363   +/-   ##
=======================================
  Coverage        ?   87.75%           
=======================================
  Files           ?      183           
  Lines           ?    10339           
  Branches        ?        0           
=======================================
  Hits            ?     9073           
  Misses          ?     1266           
  Partials        ?        0           
Flag Coverage Δ
cpu 87.75% <99.42%> (?)
pytest 87.75% <99.42%> (?)

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.

@Muhammad-Rebaal
Muhammad-Rebaal marked this pull request as draft August 11, 2026 15:51
@Muhammad-Rebaal

Copy link
Copy Markdown
Member Author

Hi @phoeenniixx,

I've implemented the ModernTCN model.

Here are some changes, in the pytorch_forecasting\layers:

  • Added re-usable block as ModernTCNBlock
  • Added two new layers:
  1. _convolution that contains _reparam_large_kernel_conv.py
  2. _head that contains _flatten_head.py

The purpose of adding these layers separately is for reusability in future models.

@Muhammad-Rebaal
Muhammad-Rebaal marked this pull request as ready for review August 12, 2026 15:01
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.

[ENH] Add v2 interface support for ModernTCN: A Modern Pure Convolution Structure for General Time Series Analysis

2 participants