Fix checkpoint fallback 3595#3685
Conversation
…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
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Thank you for contributing to
|
|
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 |
No description provided.