← Back to Pull requests

Pin kernels<0.13.0 in [cuda] extra to prevent huggingface-hub conflic… #126

Open
gps23 opened this pull request with 226 lines diff across 2 files
View on GitHub
gps23 gps23 commented on Jul 23, 2026 10:18 UTC
Author

Fixes #91

Root cause: kernels>=0.13.0 bumped its huggingface-hub requirement to >=1.10.0, which conflicts with transformers>=4.57.6,<5.0's requirement of huggingface-hub<1.0. When kernels is installed/upgraded independently (e.g. in a separate pip install step after transformers is already resolved), pip doesn't re-validate transformers' constraint, so you end up with a newer huggingface-hub installed alongside old transformers — which fails transformers' own version guard at import time.

Verification: Bisected the exact breaking version using Docker:

  • kernels==0.12.3 + transformers==4.57.6 → imports fine

  • kernels==0.13.0 + transformers==4.57.6 → ImportError: huggingface-hub>=0.34.0,<1.0 is required for a normal functioning of this module, but found huggingface-hub==1.24.0.
  • Note: a single-command pip install kernels transformers (no version drift) naturally resolves to a compatible kernels version, since pip's resolver considers both constraints together. The bug only surfaces when kernels is installed/upgraded in a separate step from transformers, which is training_hub's own install pattern (pip install training-hub[lora] then pip install training-hub[cuda]).

    Fix: Capped kernels<0.13.0 in the [cuda] extra.

    <!-- This is an auto-generated comment: release notes by coderabbit.ai -->

    Summary by CodeRabbit

    Chores
    Updated the CUDA installation requirements to improve compatibility and stability.
    CUDA setups now use kernels versions from 0.9.0 up to, but not including, 0.13.0.
    This helps ensure supported CUDA installations use a compatible version range and avoid unintended upgrades beyond the validated release range.
    <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    Diff: 226 lines (+169 / -57) across 2 files Reviewer: None requested Review duration: 189376m
    All Vouch review confidence checks passed
    Residual risk 0.32 = Change Risk (0.56) × (1 − Review Confidence (0.42)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.56 · 226 lines diff across 2 files
    0.56
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 10%
    42%
    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
    Shallow Review Depth shallow_review_depth
    0.344
    Diff Size diff_size
    0.325
    No Reviewer Assigned no_reviewer_assigned
    0.120
    Real PR Conversation Timeline
    1 comments
    "Review active on #126"
    general weight: 0.35
    Reviewers
    None requested
    Assignees
    gps23 gps23
    Labels
    risk: low confidence: 42.2% 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: 55.9% (MEDIUM) · Higher = larger blast radius
    55.9%
    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: 42.2% · Lower = rushed or shallow review
    42.2%
    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: 32.3% · Safe to merge
    32.3%