Remove --parallel_threads flag from to_huggingface.py - #4977
Open
chiajunglien wants to merge 1 commit into
Open
Conversation
chiajunglien
requested review from
RissyRan,
aireenmei,
bvandermoon,
gagika,
gobbleturk,
hengtaoguo,
igorts-git,
jiangjy1982,
parambole,
richjames0,
shralex and
shuningjin
as code owners
August 24, 2026 02:15
There was a problem hiding this comment.
Code Review
This pull request removes the "parallel_threads" command-line flag and its validator from "to_huggingface.py". However, this change will cause a runtime "AttributeError" because "FLAGS.parallel_threads" is still referenced in a downstream call to "save_model_files". You should remove this argument from the function call to allow it to use its default value.
chiajunglien
force-pushed
the
emma/remove-parallel-flag
branch
from
August 24, 2026 02:20
a88b8d9 to
23fd513
Compare
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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 removes the exposed
--parallel_threadscommand-line flag fromsrc/maxtext/checkpoint_conversion/to_huggingface.pyand cleans up its arguments.The
--parallel_threadsflag was originally introduced to explicitly limit concurrency in the E2E testing script (test_llama3.1_70b_to_hf.sh) to prevent OOM errors on smaller memory profiles like v5p-8.Since that script was subsequently refactored to use alternative memory optimization techniques and no longer passes
--parallel_threads=2, keeping this isolated flag implementation into_huggingface.pyis obsolete.Tests
Log: https://cloudlogging.app.goo.gl/Wh68u2VnKSo3hw9u7
Checklist
Before submitting this PR, please make sure (put X in square brackets):
gemini-reviewlabel.