← Back to Pull requests

Fix ART backend compatibility with newer NVIDIA drivers #98

Closed
unknown closed this pull request without merging on Jun 18, 2026 17:17 UTC
View on GitHub
unknown unknown commented on Jun 17, 2026 15:56 UTC
Author

Summary

Two fixes for lora_grpo with the ART backend that resolve crashes on nodes with newer NVIDIA drivers (580+/610+).

Changes

1. Import unsloth before art in subprocess

The ART backend runs training in a spawned subprocess. That subprocess imports art.unsloth.service which imports from trl import GRPOTrainer, which in turn tries to import GuidedDecodingParams from vLLM. This class doesn't exist in vLLM ≤0.21, causing an ImportError.

Unsloth patches vllm.sampling_params with a GuidedDecodingParams shim, but only if imported first. Adding import unsloth before import art in _subprocess_entry ensures the patch is applied before trl tries the import.

2. Expose enforce_eager parameter

On nodes with newer NVIDIA drivers, vLLM's torch.fx compilation pipeline crashes with:

RuntimeError: Tried to erase Node size_X but it still had N users in the graph

This affects vLLM 0.19-0.23 with torch 2.10-2.11. Setting enforce_eager=True disables torch.compile and CUDA graph capture in vLLM, bypassing the issue entirely.

# Before: crashes on newer drivers
lora_grpo(model_path="Qwen/Qwen3-4B", ...)

# After: works on all drivers
lora_grpo(model_path="Qwen/Qwen3-4B", ..., enforce_eager=True)

The parameter is exposed on lora_grpo(), grpo(), and the LoRAGRPOAlgorithm.train() method.

Test plan

  • Basic lora_grpo(backend="art", enforce_eager=True) completes on node with driver 610

  • Unsloth GuidedDecodingParams patch applies correctly in subprocess

  • enforce_eager=False (default) preserves existing behavior on compatible systems
  • 🤖 Generated with Claude Code

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

    Summary by CodeRabbit

  • New Features

  • - Added enforce_eager configuration option to LoRA+GRPO training pipeline, enabling control over eager execution behavior during training
    - Improved subprocess initialization with enhanced compatibility handling

    <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    Diff: 263 lines (+197 / -66) across 3 files Reviewer: RobotSail Review duration: 1520m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.44) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.44 · 263 lines diff across 3 files
    0.44
    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.334
    Shallow Review Depth shallow_review_depth
    0.289
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    1 comments
    "Review active on #98"
    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: 44.3% (MEDIUM) · Higher = larger blast radius
    44.3%
    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.5% · Safe to merge
    17.5%