Skip to content

Update tests with zero3 for RLOO and GRPO once fixed in transformers 5.5.4#5541

Merged
albertvillanova merged 2 commits intohuggingface:mainfrom
albertvillanova:fix-4899-tf-45137-fu-5420-5404-4898
Apr 14, 2026
Merged

Update tests with zero3 for RLOO and GRPO once fixed in transformers 5.5.4#5541
albertvillanova merged 2 commits intohuggingface:mainfrom
albertvillanova:fix-4899-tf-45137-fu-5420-5404-4898

Conversation

@albertvillanova
Copy link
Copy Markdown
Member

@albertvillanova albertvillanova commented Apr 14, 2026

Update tests with zero3 for RLOO and GRPO once fixed in transformers 5.5.4.

This PR updates the test conditions for ZeRO-3 integration with the transformers library to reflect a recent upstream fix. The tests now only expect failures for a specific range of transformers versions where the issue is known to occur, improving the accuracy of test expectations.

Fix #4899, after the upstream issue in transformers:

has been fixed by:

Follow-up to:

Changes

Test condition updates:

  • In both test_reward and test_rloo in tests/distributed/test_distributed.py, the pytest.mark.xfail condition for the "zero3" parameter is updated to only expect failures when transformers version is greater than or equal to 5.0.0 and less than 5.5.4, reflecting that the issue is fixed in transformers#45414. The reason message is also updated for clarity.

Note

Low Risk
Low risk: only adjusts pytest xfail version gating and messages in distributed tests, with no production code changes.

Overview
Updates distributed tests so the zero3 parameter is only marked xfail for transformers versions >= 5.0.0 and < 5.5.4, reflecting that the upstream ZeRO-3 issue is fixed in transformers 5.5.4.

Also updates the associated xfail reason strings (and keeps strict=True) in test_rloo and test_grpo to document the fixed upstream PR/reference.

Reviewed by Cursor Bugbot for commit fef7620. Bugbot is set up for automated code reviews on this repo. Configure here.

@HuggingFaceDocBuilderDev
Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@albertvillanova albertvillanova merged commit 5f3ec05 into huggingface:main Apr 14, 2026
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RLOO and GRPO failing with ZeRO3: IndexError: pop from an empty deque

3 participants