Skip to content

[ENH] Add Feature load_model to Deep Regressor Ensembles#3130

Merged
hadifawaz1999 merged 8 commits intoaeon-toolkit:mainfrom
rwtarpit:fix/issue-2770-load-model
Nov 24, 2025
Merged

[ENH] Add Feature load_model to Deep Regressor Ensembles#3130
hadifawaz1999 merged 8 commits intoaeon-toolkit:mainfrom
rwtarpit:fix/issue-2770-load-model

Conversation

@rwtarpit
Copy link
Copy Markdown
Contributor

@rwtarpit rwtarpit commented Nov 23, 2025

Reference Issues/PRs

Fixes #2770

What does this implement/fix? Explain your changes.

This PR implements the missing load_model functionality for deep regressor ensembles and corrects a systemic documentation error found in the deep classifier ensembles.

Primary Feature (Feat):
Implements the @classmethod load_model for LITETimeRegressor and InceptionTimeRegressor.

  • The implementation uses a loop over a list of model paths (model_path: list[str]).
  • New unit tests are included in test_lite_time.py and test_inception_time.py to verify lossless save/load functionality using regression_target=True.

Systemic Fixes (Docs/Fix):
Based on mentor feedback, this PR includes essential fixes for code consistency and correctness:

  1. Documentation Correction (Docs): Corrects misleading documentation across the base classes (BaseDeepClassifier, BaseDeepRegressor) and the deep classifier ensembles. The model_path parameter is corrected to reflect that it is the path from which the model is loaded, not where it is "will be saved."
  2. Code Consistency (Fix): Resolves a NameError in the load_model return type hint in the InceptionTimeClassifier and LITETimeClassifier by wrapping the class name in quotes (-> "InceptionTimeClassifier").

Does your contribution introduce a new dependency? If yes, which one?

No.

Any other comments?

  1. The implementation for regressors correctly omits the classes parameter in the load_model signature, as regressors do not deal with discrete labels.
  2. The implementation follows the non-standard @classmethod signature (self instead of cls) to maintain consistency with the existing Aeon deep learning module structure.

PR checklist

For all contributions
  • I've added myself to the list of contributors. Alternatively, you can use the @all-contributors bot to do this for you after the PR has been merged.
  • The PR title starts with either [ENH], [MNT], [DOC], [BUG], [REF], [DEP] or [GOV] indicating whether the PR topic is related to enhancement, maintenance, documentation, bugs, refactoring, deprecation or governance.
    (Note: The suggested title starts with [FEAT] which is covered by the [ENH] (enhancement) tag often used in Aeon, or can be used on its own if the project allows it. We use the most relevant tags.)
For new estimators and functions
  • I've added the estimator/function to the online API documentation.
  • (OPTIONAL) I've added myself as a __maintainer__ at the top of relevant files and want to be contacted regarding its maintenance. Unmaintained files may be removed. This is for the full file, and you should not add yourself if you are just making minor changes or do not want to help maintain its contents.
For developers with write access
  • (OPTIONAL) I've updated aeon's CODEOWNERS to receive notifications about future changes to these files.

@aeon-actions-bot aeon-actions-bot bot added classification Classification package regression Regression package labels Nov 23, 2025
@aeon-actions-bot
Copy link
Copy Markdown
Contributor

Thank you for contributing to aeon

I did not find any labels to add based on the title. Please add the [ENH], [MNT], [BUG], [DOC], [REF], [DEP] and/or [GOV] tags to your pull requests titles. For now you can add the labels manually.
I have added the following labels to this PR based on the changes made: [ classification, regression ]. Feel free to change these if they do not properly represent the PR.

The Checks tab will show the status of our automated tests. You can click on individual test runs in the tab or "Details" in the panel below to see more information if there is a failure.

If our pre-commit code quality check fails, any trivial fixes will automatically be pushed to your PR unless it is a draft.

Don't hesitate to ask questions on the aeon Slack channel if you have any.

PR CI actions

These checkboxes will add labels to enable/disable CI functionality for this PR. This may not take effect immediately, and a new commit may be required to run the new configuration.

  • Run pre-commit checks for all files
  • Run mypy typecheck tests
  • Run all pytest tests and configurations
  • Run all notebook example tests
  • Run numba-disabled codecov tests
  • Stop automatic pre-commit fixes (always disabled for drafts)
  • Disable numba cache loading
  • Regenerate expected results for testing
  • Push an empty commit to re-run CI checks

@rwtarpit rwtarpit changed the title Fix/issue 2770 load model Fix/issue 2770 load_model Nov 23, 2025
@rwtarpit rwtarpit force-pushed the fix/issue-2770-load-model branch 2 times, most recently from 45d7989 to dd34104 Compare November 23, 2025 12:14
@rwtarpit rwtarpit changed the title Fix/issue 2770 load_model [ENH]/issue 2770 load_model Nov 23, 2025
@rwtarpit rwtarpit changed the title [ENH]/issue 2770 load_model [ENH] Issue 2770 load_model Nov 23, 2025
@rwtarpit rwtarpit changed the title [ENH] Issue 2770 load_model [ENH] Add Feature load_model to Deep Regressor Ensembles Nov 23, 2025
Copy link
Copy Markdown
Member

@hadifawaz1999 hadifawaz1999 left a comment

Choose a reason for hiding this comment

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

Thanks for taking care of this
Just a few comments

@rwtarpit rwtarpit force-pushed the fix/issue-2770-load-model branch from 889fa1b to 4a978a6 Compare November 23, 2025 14:55
@rwtarpit rwtarpit force-pushed the fix/issue-2770-load-model branch from 81bc545 to d0986b3 Compare November 23, 2025 16:00
@rwtarpit rwtarpit force-pushed the fix/issue-2770-load-model branch from 556a175 to 79b6719 Compare November 23, 2025 16:11
Copy link
Copy Markdown
Member

@hadifawaz1999 hadifawaz1999 left a comment

Choose a reason for hiding this comment

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

My bad !

@rwtarpit rwtarpit force-pushed the fix/issue-2770-load-model branch from 1782d6e to 9187acb Compare November 24, 2025 04:21
Copy link
Copy Markdown
Member

@hadifawaz1999 hadifawaz1999 left a comment

Choose a reason for hiding this comment

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

LGTM Thanks !

@hadifawaz1999 hadifawaz1999 merged commit ff28266 into aeon-toolkit:main Nov 24, 2025
19 checks passed
@rwtarpit rwtarpit deleted the fix/issue-2770-load-model branch November 24, 2025 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

classification Classification package regression Regression package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ENH] Adding load_model functionality to deep regressor ensembles

2 participants