Skip to content

Add eval_start_step flag and allow evaluation from step 0#4547

Open
zxhe-sean wants to merge 1 commit into
mainfrom
zxhe/eval_start_step
Open

Add eval_start_step flag and allow evaluation from step 0#4547
zxhe-sean wants to merge 1 commit into
mainfrom
zxhe/eval_start_step

Conversation

@zxhe-sean

@zxhe-sean zxhe-sean commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

Description

This PR adds full support for the eval_start_step configuration flag in MaxText to delay or control when interval-based evaluations trigger during pre-training, and updates the evaluation step check from step > start_step to step >= start_step.

Why is this change being made

  1. Support for eval_start_step: The need of the delay is coming from the new validation requirement of MLPerf

The validation starts after N(GBS) = GBS*FLOOR(42+24576/GBS) samples - this gives us 2-3 spare evaluations before we hit the RCP min, and ~4 before we hit the RCP avg.

  1. Support evaluation on step 0 / start_step (step >= start_step): The evaluation condition previously checked step > start_step, strictly preventing evaluations from firing on the very first step (step == start_step), such as when start_step = 0 and eval_interval = 1. Updating this to step >= start_step allows evaluation to fire on step 0 or the starting step when configured.

FIXES: b/535641549

Tests

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

codecov Bot commented Jul 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@RissyRan RissyRan left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the change!

Comment thread src/maxtext/configs/base.yml Outdated
Comment thread src/maxtext/configs/types.py Outdated
Comment thread src/maxtext/trainers/pre_train/train.py Outdated
Comment thread tests/unit/pyconfig_test.py
@zxhe-sean
zxhe-sean force-pushed the zxhe/eval_start_step branch from 0b02891 to c48f9d3 Compare July 22, 2026 00:03
@zxhe-sean
zxhe-sean force-pushed the zxhe/eval_start_step branch from c48f9d3 to d2f0052 Compare July 22, 2026 21:51
@zxhe-sean zxhe-sean changed the title Add eval_start_step flag to configure initial evaluation delay Add eval_start_step flag and allow evaluation from step 0 Jul 22, 2026

@aireenmei aireenmei left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants