Skip to content

[BUG] FIX DRNN load bug#3074

Merged
hadifawaz1999 merged 2 commits into
aeon-toolkit:mainfrom
PipaFlores:bugfix
Oct 3, 2025
Merged

[BUG] FIX DRNN load bug#3074
hadifawaz1999 merged 2 commits into
aeon-toolkit:mainfrom
PipaFlores:bugfix

Conversation

@PipaFlores
Copy link
Copy Markdown
Contributor

Reference Issues/PRs

What does this implement/fix? Explain your changes.

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

Any other comments?

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.
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 bug Something isn't working clustering Clustering package labels Sep 17, 2025
@aeon-actions-bot
Copy link
Copy Markdown
Contributor

Thank you for contributing to aeon

I have added the following labels to this PR based on the title: [ bug ].
I have added the following labels to this PR based on the changes made: [ clustering ]. 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

@MatthewMiddlehurst MatthewMiddlehurst changed the title FIX DRNN load bug [BUG] FIX DRNN load bug Sep 22, 2025
@MatthewMiddlehurst
Copy link
Copy Markdown
Member

Is there an issue with the inherited function? If so, wonder why it is not captured by testing. No description to go by.

@PipaFlores
Copy link
Copy Markdown
Contributor Author

I don't know why my message did not appear in the original post. I did not notice

Yes, the load function is inherited from BaseDeepClusterer, but it uses the basic functionality to "simply" load the model.

The Dilated Recurrent NN autoencoder uses a custom module, which needs to be provided to the load function to work properly. That is the change made. This is not necessary for the other deepclusterers because they do not have any particularly special modules.

To replicate the bug you can just try training an AEDRNN clusterer on any number of epochs, saving, and loading.

hadifawaz1999
hadifawaz1999 previously approved these changes Sep 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.

Good catch, we do this in the end of the fit to load the best model, but didnt think about this other base function, but it also shows we dont test the function... approving this if @MatthewMiddlehurst is okay too cz it solves the issue, but if you're also motivated to PRing a test for the functions of save load in deep clustering would be great too :)

@PipaFlores
Copy link
Copy Markdown
Contributor Author

Glad to know it might help.

In a similar sense than the previous PR on adding the validation_split argument to the deepclusterers, I am only modifying the code that is useful to my research. If I eventually have time, I can get to the testing units, for know I keep to the practical. But if any other contributor find this, feel free to implement, I am sure is pretty straightforward.

@PipaFlores
Copy link
Copy Markdown
Contributor Author

Added the same fix to DCNN. I did not notice the custom class until I stepped into the bug, as it was not in the network script, as in the DRNN, but in another module utils.networks.weight_norm.

Both should work fine now, as they are for me.

Copy link
Copy Markdown
Member

@MatthewMiddlehurst MatthewMiddlehurst left a comment

Choose a reason for hiding this comment

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

approved but not merging currently. Could whoever merges (maybe me later) create an issue for testing

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.

Added the issue here #3080

@hadifawaz1999 hadifawaz1999 merged commit c8667e8 into aeon-toolkit:main Oct 3, 2025
19 checks passed
@PipaFlores PipaFlores deleted the bugfix branch October 15, 2025 06:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working clustering Clustering package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants