Skip to content

[BUG] Use get_cls in _BasePtForecaster_Common helper methods#2244

Open
Ajeem-git wants to merge 2 commits into
sktime:mainfrom
Ajeem-git:issue-2187-get-cls-fix
Open

[BUG] Use get_cls in _BasePtForecaster_Common helper methods#2244
Ajeem-git wants to merge 2 commits into
sktime:mainfrom
Ajeem-git:issue-2187-get-cls-fix

Conversation

@Ajeem-git
Copy link
Copy Markdown

Summary: Fix dormant AttributeError paths in _BasePtForecaster_Common by replacing calls to the undefined get_model_cls() with the existing get_cls() helper.

What changed:

  • Updated name() fallback to use get_cls().
  • Updated create_test_instance() to instantiate via get_cls().
  • Updated create_test_instances_and_names() to instantiate via get_cls().

Why:
_BasePtForecaster_Common defines get_cls(), but three helper paths were calling get_model_cls(), which does not exist. This leaves dormant AttributeError paths in the base helper methods.

Verification:

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@af9b14f). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2244   +/-   ##
=======================================
  Coverage        ?   86.94%           
=======================================
  Files           ?      167           
  Lines           ?     9782           
  Branches        ?        0           
=======================================
  Hits            ?     8505           
  Misses          ?     1277           
  Partials        ?        0           
Flag Coverage Δ
cpu 86.94% <100.00%> (?)
pytest 86.94% <100.00%> (?)

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.

@PranavBhatP PranavBhatP changed the title Use get_cls in _BasePtForecaster_Common helper methods [BUG] Use get_cls in _BasePtForecaster_Common helper methods Apr 14, 2026
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