Skip to content

Fix checkpoint fallback 3595#3685

Open
SpiliosDimakopoulos wants to merge 4 commits into
aeon-toolkit:mainfrom
SpiliosDimakopoulos:fix-checkpoint-fallback-3595
Open

Fix checkpoint fallback 3595#3685
SpiliosDimakopoulos wants to merge 4 commits into
aeon-toolkit:mainfrom
SpiliosDimakopoulos:fix-checkpoint-fallback-3595

Conversation

@SpiliosDimakopoulos

Copy link
Copy Markdown

No description provided.

Your Name added 4 commits July 25, 2026 13:08
…oolkit#3677)

temporal_importance_curves() raised
'ValueError: not enough values to unpack (expected 2, got 0)' when every
tree in a fitted interval forest was a stump (no internal splits), because
it tried to unpack an empty zip(sorted(...)).

- temporal_importance_curves() now returns ([], []) instead of raising
  when the forest contains no splits.
- plot_temporal_importance_curves() now raises a clear ValueError when
  given empty curves, instead of silently plotting NaN (previously
  np.mean([], axis=0) produced a RuntimeWarning and a NaN dashed line).
- test_tic_curves is now deterministic (random_state=0), since it
  previously could hit this exact edge case flakily depending on the
  random split found in a tiny test forest.
- Added a regression test (test_tic_curves_all_stumps) using a constant
  input series, which deterministically produces an all-stump forest.

Fixes aeon-toolkit#3677
…-toolkit#3418)

'max_dims' predates aeon settling on 'channels' terminology for
multivariate series dimensions, and is inconsistent with the rest of the
codebase (e.g. n_channels_, capability:multivariate).

This mirrors the identical rename already done for OrdinalTDE and
IndividualOrdinalTDE (which already expose 'max_channels' with a
deprecated 'max_dims' alias): adds 'max_channels' to
TemporalDictionaryEnsemble and IndividualTDE, keeps 'max_dims' for one
deprecation cycle with a FutureWarning mapping it to 'max_channels', and
updates the internal IndividualTDE construction inside
TemporalDictionaryEnsemble accordingly.

Also updates/extends aeon/classification/dictionary_based/tests/test_tde.py,
including a new test for the deprecation warning.

Fixes aeon-toolkit#3418
…olkit#3595)

'try: tf.keras.models.load_model(...) except FileNotFoundError:' is
unreliable: with save_best_only=True the ModelCheckpoint callback is not
guaranteed to have written a file by the time fit() tries to load it back,
and depending on the TensorFlow/Keras backend a missing/unwritten file can
raise something other than FileNotFoundError, causing intermittent CI
failures (see aeon-toolkit#3595, fixed for InceptionTimeRegressor in aeon-toolkit#3601).

This applies the same fix already merged for InceptionTimeRegressor
(explicit os.path.exists() check, falling back to the trained in-memory
model if the checkpoint was never written) across every other deep
learner with the same pattern:

- aeon/classification/deep_learning: _inception_time, _lite_time, _fcn,
  _mlp, _resnet, _encoder, _cnn, _disjoint_cnn
- aeon/regression/deep_learning: _fcn, _lite_time, _mlp, _resnet,
  _encoder, _cnn, _disjoint_cnn, _rnn
- aeon/clustering/deep_learning: _ae_resnet, _ae_drnn, _ae_bgru,
  _ae_dcnn, _ae_fcn, _ae_abgru
- aeon/transformations/collection/self_supervised: _trilite, _time_mcl

Adds parametrized regression tests (mirroring the one added in aeon-toolkit#3601)
across all fixed classification, regression, and self-supervised
estimators, verifying fit() completes and falls back correctly when the
checkpoint callback never writes a file. The existing parametrized
aeon/clustering/deep_learning/tests/test_deep_clusterer_io.py already
covers all 6 fixed clustering estimators and continues to pass.

Fixes aeon-toolkit#3595
The old 'znormalized' parameter defaulted to True, meaning 'do not
z-normalize because the input is already normalized' -- confusing,
since True implied normalization would happen.

This introduces 'znormalize' (default=True), which now always means
'z-normalize the windows'. The old 'znormalized' parameter is kept
for one deprecation cycle: passing it raises a FutureWarning and
maps to the equivalent 'znormalize' value (znormalize = not
znormalized), per the project's deprecation policy.

Also updates the SAX example notebook and REDCOMETS' internal SAX
call to the new parameter name, and updates/extends the SAX test
suite (including new tests for the deprecation warning and its
behavioural equivalence).

Fixes aeon-toolkit#3678
@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@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.
This PR changes too many different packages (>3) for automatic addition of labels, please manually add package labels if relevant.

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, please run pre-commit locally and push the fixes to your PR branch.

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

PR CI actions

These checkboxes will add labels to enable or 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
  • Disable numba cache loading
  • Regenerate expected results for testing
  • Push an empty commit to re-run CI checks

@TonyBagnall

Copy link
Copy Markdown
Contributor

thanks for this, please start the PR title with either [ENH], [MNT], [DOC], [BUG], [REF], [DEP] or [GOV] as per template instructions and actually describe your PR

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.

2 participants