← Back to Pull requests

[BUG] Guard default RidgeClassifierCV against LAPACK SVD overflow #3755

Closed
unknown closed this pull request without merging on Nov 28, 2026 21:54 UTC
View on GitHub
unknown unknown commented on Aug 22, 2026 12:55 UTC
Author

Reference Issues/PRs


Fixes #3737.

What does this implement/fix? Explain your changes.


Several classifiers (RDSTClassifier, RocketClassifier, MultiRocketHydraClassifier)
fit a default RidgeClassifierCV on transformed feature matrices that can be too large
for 32-bit LAPACK to index. SciPy then raises ValueError: Indexing a matrix of N
elements would incur an integer overflow in LAPACK
, which does not say which aeon
estimator failed or what to do about it.

This PR:

  • Changes check_lapack_svd_safe in aeon.utils.validation to take the caught error.

  • If it is SciPy's LAPACK integer overflow, it raises an informative ValueError that
    names the estimator, gives the matrix shape, suggests a different estimator, and
    chains the original error.
  • Calls it from RDSTClassifier, RocketClassifier and MultiRocketHydraClassifier

  • when fitting the default estimator fails. Other errors, and errors from custom
    estimators, are not changed.
  • Keeps RocketClassifier.pipeline_. The steps are fitted manually and the pipeline is

  • assembled from the fitted objects afterwards.

    The first version of this PR predicted the failure from n_samples * n_features. That
    is only correct for tall data on older scikit-learn (the SVD path), and it ignores
    ILP64 SciPy builds, so the fit is now attempted and the real error is explained.

    The estimator parameter of MultiRocketHydraClassifier was added separately in #4006.
    This PR does not address the separate 128GB OOM reported for
    MultiRocketHydraClassifier on AustraliaRainfall_disc.

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


    No.

    Any other comments?


    This PR targets only the LAPACK indexing bug not the separate 128GB OOM reported for MultiRocketHydraClassifier on AustraliaRainfall_disc.

    AI was used to help understand parts of the codebase and LAPACK, scipy internals
    while working through this fix; all changes were written and reviewed by me.

    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.
  • Diff: 382 lines (+286 / -96) across 4 files Reviewer: aashoday Review duration: 141658m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.43) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.43 · 382 lines diff across 4 files
    0.43
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.356
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #3755"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 43.0% (MEDIUM) · Higher = larger blast radius
    43.0%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 17.0% · Safe to merge
    17.0%