Skip to content

Refactor rl_train and add unit test for prompt filtering#3399

Open
igorts-git wants to merge 1 commit intomainfrom
igorts/b490410764-prompt-filter-test
Open

Refactor rl_train and add unit test for prompt filtering#3399
igorts-git wants to merge 1 commit intomainfrom
igorts/b490410764-prompt-filter-test

Conversation

@igorts-git
Copy link
Collaborator

Description

Split the rl_train() function to extract the dataset construction logic into a separate function.
Add unit tests to the long sequence filtering logic.

FIXES: b/490410764

Tests

Added unit tests to the new logic.
CI.

Checklist

Before submitting this PR, please make sure (put X in square brackets):

  • I have performed a self-review of my code. For an optional AI review, add the gemini-review label.
  • I have necessary comments in my code, particularly in hard-to-understand areas.
  • I have run end-to-end tests tests and provided workload links above if applicable.
  • I have made or will make corresponding changes to the doc if needed, including adding new documentation pages to the relevant Table of Contents (toctree directive) as explained in our documentation.

@codecov
Copy link

codecov bot commented Mar 12, 2026

Codecov Report

❌ Patch coverage is 12.50000% with 21 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/maxtext/trainers/post_train/rl/train_rl.py 12.50% 21 Missing ⚠️

📢 Thoughts on this report? Let us know!

@igorts-git igorts-git marked this pull request as ready for review March 12, 2026 17:07
@igorts-git igorts-git changed the title Refactor rl_train and add unit test for prompt filtering and Refactor rl_train and add unit test for prompt filtering Mar 12, 2026
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.

1 participant