transformers - ✅(Solved) Fix CI: failing slow runs fails to report properly [1 pull requests, 2 comments, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
huggingface/transformers#44238Fetched 2026-04-08 00:29:41
View on GitHub
Comments
2
Participants
1
Timeline
9
Reactions
0
Participants
Timeline (top)
commented ×2referenced ×2closed ×1labeled ×1

Root Cause

and I can see that it does not hit the function that creates the file, most likely because it does not go through a patched assertion = here its StopIteration

Fix Action

Fix / Workaround

PATCH_TESTING_METHODS_TO_COLLECT_OUTPUTS=yes _PATCHED_TESTING_METHODS_OUTPUT_DIR=. pytest -sxv tests/models/qwen3_vl/test_modeling_qwen3_vl.py::Qwen3VLModelTest::test_multi_gpu_data_parallel_forward --make-reports reports

and I can see that it does not hit the function that creates the file, most likely because it does not go through a patched assertion = here its StopIteration

PR fix notes

PR #43972: :rotating_light: Unify 3D position ids

Description (problem / solution / changelog)

What does this PR do?

Following Ernie, we build 3d positions based on mm_token_type_ids and the models will return them by default from processor.

We have a unified get_vision_position in the qwen2-vl model file, all other models just copy it from there. The utility build vision ids as the name suggests, and the models are free to manipulate on top as they wish. In most cases, the only thing that changes is the presence of new modalities or kwargs

Changed files

  • src/transformers/models/ernie4_5_vl_moe/modeling_ernie4_5_vl_moe.py (modified, +117/-77)
  • src/transformers/models/ernie4_5_vl_moe/modular_ernie4_5_vl_moe.py (modified, +54/-114)
  • src/transformers/models/glm46v/modeling_glm46v.py (modified, +140/-104)
  • src/transformers/models/glm46v/processing_glm46v.py (modified, +19/-2)
  • src/transformers/models/glm4v/modeling_glm4v.py (modified, +140/-104)
  • src/transformers/models/glm4v/modular_glm4v.py (modified, +134/-151)
  • src/transformers/models/glm4v/processing_glm4v.py (modified, +19/-2)
  • src/transformers/models/glm4v_moe/modeling_glm4v_moe.py (modified, +140/-104)
  • src/transformers/models/glm4v_moe/modular_glm4v_moe.py (modified, +2/-0)
  • src/transformers/models/glm_image/modeling_glm_image.py (modified, +59/-10)
  • src/transformers/models/glm_image/modular_glm_image.py (modified, +3/-10)
  • src/transformers/models/glm_ocr/modeling_glm_ocr.py (modified, +140/-104)
  • src/transformers/models/paddleocr_vl/modeling_paddleocr_vl.py (modified, +140/-95)
  • src/transformers/models/paddleocr_vl/modular_paddleocr_vl.py (modified, +16/-2)
  • src/transformers/models/paddleocr_vl/processing_paddleocr_vl.py (modified, +15/-2)
  • src/transformers/models/qwen2_5_vl/modeling_qwen2_5_vl.py (modified, +138/-108)
  • src/transformers/models/qwen2_5_vl/modular_qwen2_5_vl.py (modified, +81/-108)
  • src/transformers/models/qwen2_5_vl/processing_qwen2_5_vl.py (modified, +3/-2)
  • src/transformers/models/qwen2_vl/modeling_qwen2_vl.py (modified, +140/-95)
  • src/transformers/models/qwen2_vl/processing_qwen2_vl.py (modified, +8/-1)
  • src/transformers/models/qwen3_5/modeling_qwen3_5.py (modified, +155/-71)
  • src/transformers/models/qwen3_5/modular_qwen3_5.py (modified, +2/-0)
  • src/transformers/models/qwen3_5_moe/modeling_qwen3_5_moe.py (modified, +155/-71)
  • src/transformers/models/qwen3_vl/modeling_qwen3_vl.py (modified, +155/-71)
  • src/transformers/models/qwen3_vl/modular_qwen3_vl.py (modified, +6/-126)
  • src/transformers/models/qwen3_vl/processing_qwen3_vl.py (modified, +8/-1)
  • src/transformers/models/qwen3_vl_moe/modeling_qwen3_vl_moe.py (modified, +155/-71)
  • src/transformers/models/qwen3_vl_moe/modular_qwen3_vl_moe.py (modified, +2/-0)
  • src/transformers/models/video_llama_3/modular_video_llama_3.py (modified, +7/-0)
  • src/transformers/models/video_llama_3/processing_video_llama_3.py (modified, +1/-0)
  • src/transformers/utils/auto_docstring.py (modified, +9/-0)
  • tests/models/glm46v/test_modeling_glm46v.py (modified, +4/-0)
  • tests/models/glm46v/test_processor_glm46v.py (modified, +1/-1)
  • tests/models/glm4v/test_modeling_glm4v.py (modified, +4/-0)
  • tests/models/glm4v/test_processor_glm4v.py (modified, +1/-1)
  • tests/models/glm4v_moe/test_modeling_glm4v_moe.py (modified, +4/-0)
  • tests/models/glm_ocr/test_modeling_glm_ocr.py (modified, +4/-0)
  • tests/models/qwen2_5_vl/test_modeling_qwen2_5_vl.py (modified, +9/-0)
  • tests/models/qwen2_5_vl/test_processing_qwen2_5_vl.py (modified, +1/-1)
  • tests/models/qwen2_vl/test_modeling_qwen2_vl.py (modified, +7/-0)
  • tests/models/qwen2_vl/test_processing_qwen2_vl.py (modified, +1/-1)
  • tests/models/qwen3_5/test_modeling_qwen3_5.py (modified, +5/-0)
  • tests/models/qwen3_vl/test_modeling_qwen3_vl.py (modified, +7/-0)
  • tests/models/qwen3_vl/test_processing_qwen3_vl.py (modified, +1/-1)
  • tests/models/qwen3_vl_moe/test_modeling_qwen3_vl_moe.py (modified, +7/-0)

Code Example

PATCH_TESTING_METHODS_TO_COLLECT_OUTPUTS=yes _PATCHED_TESTING_METHODS_OUTPUT_DIR=. pytest -sxv tests/models/qwen3_vl/test_modeling_qwen3_vl.py::Qwen3VLModelTest::test_multi_gpu_data_parallel_forward --make-reports reports
RAW_BUFFERClick to expand / collapse

The following issue description was a red herring, the real problem is described at https://github.com/huggingface/transformers/issues/44238#issuecomment-3946684226

Slow runs try to cat captured_info.txt which seems to not be always present

https://github.com/huggingface/transformers/pull/43972#issuecomment-3945840080

the GH step that update the report fails after the runs finish.

I reproduced the issue in SSH with

PATCH_TESTING_METHODS_TO_COLLECT_OUTPUTS=yes _PATCHED_TESTING_METHODS_OUTPUT_DIR=. pytest -sxv tests/models/qwen3_vl/test_modeling_qwen3_vl.py::Qwen3VLModelTest::test_multi_gpu_data_parallel_forward --make-reports reports

and I can see that it does not hit the function that creates the file, most likely because it does not go through a patched assertion = here its StopIteration

maybe we could simply touch the file when the tests starts, or make the step more resilient in the absence of it.

extent analysis

Fix Plan

Solution Overview

The issue arises from the absence of captured_info.txt when running tests. To resolve this, we'll modify the test setup to ensure the file is present.

Step-by-Step Solution

1. Create captured_info.txt at the beginning of the test

import os

def pytest_sessionstart(session):
    # Create captured_info.txt at the beginning of the test
    with open("captured_info.txt", "w") as f:
        pass

2. Update the test to use the created file

import pytest

def test_multi_gpu_data_parallel_forward(tmp_path):
    # Use the created file
    with open("captured_info.txt", "r") as f:
        captured_info = f.read()

3. Alternatively, make the step more resilient

Instead of creating the file, you can modify the step to check for its existence and proceed accordingly.

import os

def pytest_sessionstart(session):
    if not os.path.exists("captured_info.txt"):
        # Handle the absence of the file
        print("captured_info.txt not found. Proceeding with test.")

Verification

  1. Run the test with the modified code.
  2. Verify that the test completes successfully.
  3. Check that the captured_info.txt file is present.

Extra Tips

  • Make sure to commit the changes and push them to the repository.
  • If you're using a CI/CD pipeline, update the pipeline configuration to reflect the changes.
  • Consider adding a test case to cover the scenario where the file is missing.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING