Skip to content

Upgrade post training deps - #4184

Open
khatwanimohit wants to merge 2 commits into
mainfrom
mohit/tpu-infer-07-16
Open

Upgrade post training deps#4184
khatwanimohit wants to merge 2 commits into
mainfrom
mohit/tpu-infer-07-16

Conversation

@khatwanimohit

@khatwanimohit khatwanimohit commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

Description

Summary

  • GCC version: Upgrades TPU Dockerfile base image from python:3.12-slim-bullseye
    (GCC 10.2.1) to python:3.12-slim-bookworm (GCC 12.2.0). The new vllm commit
    (a30addc7) introduced a CMake check requiring GCC ≥ 11.3 for C++20 support
    vllm PR #44923.

Notice 1: Once all tests pass, the "pull ready" label will automatically be assigned.
This label is used for administrative purposes. Please do not add it manually.

Notice 2: For external contributions, our settings currently require an approval from a MaxText maintainer to trigger CI tests.

Tests

build_maxtext_docker_image WORKFLOW=post-training completes successfully

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 Jun 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 52.94118% with 16 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...ners/post_train/distillation/distillation_utils.py 56.66% 5 Missing and 8 partials ⚠️
.../trainers/post_train/distillation/train_distill.py 25.00% 2 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@khatwanimohit
khatwanimohit force-pushed the mohit/tpu-infer-07-16 branch from 3421155 to 96eb4e0 Compare June 30, 2026 03:45
@khatwanimohit
khatwanimohit force-pushed the mohit/tpu-infer-07-16 branch from 96eb4e0 to 6eb9a55 Compare July 23, 2026 17:23
@khatwanimohit
khatwanimohit force-pushed the mohit/tpu-infer-07-16 branch from 6eb9a55 to 6e45c71 Compare July 23, 2026 17:25
@khatwanimohit khatwanimohit changed the title Fix post-training Docker build for new vllm commit Upgrade post training deps Jul 23, 2026
@khatwanimohit
khatwanimohit force-pushed the mohit/tpu-infer-07-16 branch 3 times, most recently from 77d3e9f to a19e7b9 Compare July 23, 2026 19:10
@khatwanimohit
khatwanimohit force-pushed the mohit/tpu-infer-07-16 branch from a19e7b9 to 1fd6bbc Compare July 23, 2026 19:32
@khatwanimohit
khatwanimohit force-pushed the mohit/tpu-infer-07-16 branch from df8f2e2 to fd87931 Compare July 24, 2026 18:23
@khatwanimohit
khatwanimohit force-pushed the mohit/tpu-infer-07-16 branch 3 times, most recently from 0a12419 to 1f6332b Compare July 27, 2026 16:54
current_dir = os.path.dirname(os.path.abspath(__file__))
repo_root = os.path.abspath(os.path.join(current_dir, "..", ".."))
github_deps_path = os.path.join(repo_root, "dependencies", "extra_deps", "post_train_github_deps.txt")
if not os.path.exists(github_deps_path):

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.

Why is this check removed?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

added the check back

"override_model_config=True",
"scan_layers=False",
"hardware=cpu",
"attention=dot_product",

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.

why this change?

@khatwanimohit khatwanimohit Jul 27, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

this was fix the CI failure, but Hengtao has merged this to main in #4609. So I'm removing this and rebasing

@khatwanimohit
khatwanimohit force-pushed the mohit/tpu-infer-07-16 branch from 1f6332b to 255d2e1 Compare July 27, 2026 18:35

is_root = os.geteuid() == 0 if hasattr(os, "geteuid") else False
has_sudo = shutil.which("sudo") is not None
if (is_root or has_sudo) and shutil.which("apt-get"):

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.

I would rather not run sudo commands automatically on behalf of our users. Maybe just print a error message with instructions?
The logic below is very specific for running on Linux systems based on Debian 12 and 11. I am not sure how it would work on other distributions or on future versions of Debian.

@khatwanimohit
khatwanimohit force-pushed the mohit/tpu-infer-07-16 branch 2 times, most recently from 3c1a7f5 to 136b878 Compare July 29, 2026 01:02
@khatwanimohit
khatwanimohit force-pushed the mohit/tpu-infer-07-16 branch from 136b878 to 328b59e Compare July 29, 2026 16:25
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.

4 participants