System Info
transformers version: 5.3.0.dev0
- Platform: macOS-26.3.1-arm64-arm-64bit
- Python version: 3.11.12
- Huggingface_hub version: 1.6.0
- Safetensors version: 0.7.0
- Accelerate version: not installed
- Accelerate config: not found
- DeepSpeed version: not installed
- PyTorch version (accelerator?): 2.5.1 (NA)
- Using distributed or parallel set-up in script?: N/A
Who can help?
@Cyrilvallez
@ArthurZucker
Information
Tasks
Reproduction
Run this:
import sys
from transformers.models.clip.modeling_clip import CLIPTextModel, CLIPTextConfig
# Simulate condition where module is absent from sys.modules
del sys.modules["transformers.models.clip.modeling_clip"]
config = CLIPTextConfig()
CLIPTextModel(config) # KeyError before this fix, succeeds after
I submitted a fix PR for this but it was incorrectly closed as AI slop. While I did use Claude to help me debug and isolate the problem, I can assure you this is a real fix submitted by a real human with real customers impacted by this bug.
Expected behavior
Uncaught KeyError exceptions are not raised by module importing logic
System Info
transformersversion: 5.3.0.dev0Who can help?
@Cyrilvallez
@ArthurZucker
Information
Tasks
examplesfolder (such as GLUE/SQuAD, ...)Reproduction
Run this:
I submitted a fix PR for this but it was incorrectly closed as AI slop. While I did use Claude to help me debug and isolate the problem, I can assure you this is a real fix submitted by a real human with real customers impacted by this bug.
Expected behavior
Uncaught KeyError exceptions are not raised by module importing logic