fix(scripts): fix checkpoint sharding restore, precompile CLI flag, and rollout sync in grpo demo - #1962
Open
Adityakk9031 wants to merge 1 commit into
Conversation
…nd rollout sync in grpo demo - Pass target sharding to ShapeDtypeStruct in checkpoint restore to avoid Orbax disk fallback and warnings - Synchronize restored weights to rollout worker prior to post-training evaluation - Add --skip-jax-precompile CLI flag instead of hardcoding SKIP_JAX_PRECOMPILE=1 Closes google#874
Adityakk9031
requested review from
abheesht17,
hgao327,
jiangyangmu,
lc5211,
s-noghabi,
sizhit2,
tianshub and
wang2yn84
as code owners
August 23, 2026 07:41
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR addresses issues observed when running GRPO with SGLang-JAX and Pathways (#874) by fixing checkpoint restore sharding, enabling static graph precompilation by default, and ensuring restored policy weights are synchronized to the rollout worker before post-training evaluation.
Key Changes
sharding=getattr(x, "sharding", None)tojax.ShapeDtypeStructduring checkpoint restoration.UserWarning: Sharding info not provided when restoringwarning and eliminates redundant metadata disk inspection overhead.rl_engine.rollout.update_params(src_filtered_params, filter_types)immediately after checkpoint restoration so that final evaluation accurately tests the trained/restored weights instead of stale initial rollout weights.--skip-jax-precompile):os.environ["SKIP_JAX_PRECOMPILE"] = "1"with an optional CLI flag--skip-jax-precompile(defaulting toFalse), allowing static graph precompilation during official training/benchmarking runs to reduce step execution latency.Closes #874