← Back to Pull requests

[TEST] Reduced warnings in test suite #847

Merged
GrituX merged 13 files (179 lines) on Nov 20, 2026 14:42 UTC
View on GitHub
GrituX GrituX commented on Nov 17, 2026 15:26 UTC
Author

A lot of warnings issued in the test suite came from internal DeprecationWarnings, so I filtered those out. I also made a few fixes in hidimstat._utils.utils._make_sklearn_estimator() function to handle deprecation warnings from the sklearn library, and attribute changes. This reduces all warnings from 977 to 239.
The remaining ones are mostly issued in test_knockoff.py, typically:

  • Internal warning from GaussianKnockoffs: UserWarning: The equi-correlated matrix for knockoffs is not positive definite. Reduce the value of distance by [...]

  • ConvergenceWarning: Objective did not converge. You might want to increase the number of iterations, check the scale of the features or consider increasing regularisation due to LassoCV not converging.
  • GaussianKnockoffs issue this UserWarning very often, because it happens in a loop. I think it might be a useful information to have once, but I don't know if it's useful to have it at each iteration of the algorithm.

    Diff: 179 lines (+147 / -32) across 13 files Reviewer: jpaillard Review duration: 4276m
    All Vouch review confidence checks passed
    Residual risk 0.08 = Change Risk (0.52) × (1 − Review Confidence (0.84)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.52 · 179 lines diff across 13 files
    0.52
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.78 · 5 substantive comment(s)
    0.78
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 50%
    84%
    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.311
    Real PR Conversation Timeline
    8 items
    GrituX GrituX commented on Nov 18, 2026 10:28 UTC
    Author

    The version juggling between sklearn versions in the code is getting annoying. I'll try to think of a more robust way to handle this in tests and in the CI.

    codecov[bot] codecov[bot] commented on Nov 18, 2026 10:45 UTC
    Bot

    Codecov Report


    :x: Patch coverage is 70.00000% with 3 lines in your changes missing coverage. Please review.
    :white_check_mark: Project coverage is 97.42%. Comparing base (1b50ff0) to head (ed74336).
    :warning: Report is 1 commits behind head on main.

    | Files with missing lines | Patch % | Lines |
    |---|---|---|
    | src/hidimstat/\_utils/utils.py | 70.00% | 3 Missing :warning: |

    <details><summary>Additional details and impacted files</summary>

    @@            Coverage Diff             @@
    ##             main     #847      +/-   ##
    ==========================================
    - Coverage   97.53%   97.42%   -0.11%     
    ==========================================
      Files          37       37              
      Lines        2592     2600       +8     
    ==========================================
    + Hits         2528     2533       +5     
    - Misses         64       67       +3     
    

    </details>

    :umbrella: View full report in Codecov by Harness.
    :loudspeaker: Have feedback on the report? Share it here.
    <details><summary> :rocket: New features to boost your workflow: </summary>

  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

  • </details>

    GrituX GrituX commented on Nov 18, 2026 10:49 UTC
    Author

    I don't understand why CodeCov doesn't detect that the new code is tested. I had to add these lines to make sure that the existing tests work.

    jpaillard jpaillard commented on code on Nov 18, 2026 15:48 UTC
    Code Review
    test/test_knockoff.py:1
    @@ -90,6 +90,9 @@ def test_check_preconfigure_lasso_path_attribute_before_fit():
     ###########################################################################################
     
     
    +@pytest.mark.filterwarnings(

    Should we also comment that this will be removed in release v0.6?

    jpaillard jpaillard approved these changes on Nov 18, 2026 15:48 UTC
    Approved Reviewer

    Approved these changes.

    bthirion bthirion approved these changes on Nov 18, 2026 22:08 UTC
    Approved Reviewer

    LGTM, thx.

    GrituX GrituX commented on code on Nov 20, 2026 14:20 UTC
    Code Review
    test/test_knockoff.py:1
    @@ -90,6 +90,9 @@ def test_check_preconfigure_lasso_path_attribute_before_fit():
     ###########################################################################################
     
     
    +@pytest.mark.filterwarnings(

    Yes, absolutely

    Reviewers
    Assignees
    GrituX GrituX
    Labels
    risk: low confidence: 84.4% 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: 51.6% (MEDIUM) · Higher = larger blast radius
    51.6%
    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: 84.4% · Lower = rushed or shallow review
    84.4%
    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: 8.1% · Safe to merge
    8.1%