Add Google Cloud ML Diagnostics integration for profiling - #1371
Open
rapatchi wants to merge 1 commit into
Open
Conversation
rapatchi
force-pushed
the
mldiag-integration
branch
5 times, most recently
from
July 10, 2026 08:28
1376906 to
551d10d
Compare
rapatchi
force-pushed
the
mldiag-integration
branch
from
July 15, 2026 04:57
551d10d to
c282ef8
Compare
rapatchi
force-pushed
the
mldiag-integration
branch
2 times, most recently
from
September 2, 2026 07:45
baa9425 to
320b919
Compare
rapatchi
force-pushed
the
mldiag-integration
branch
from
September 2, 2026 08:28
320b919 to
dabc985
Compare
Introduce integration with `google_cloud_mldiagnostics` to support automated profiler (xprof) tracing on Google Cloud Platform. * Add `ManagedMLDiagnostics` singleton (`axlearn/common/managed_mldiagnostics.py`) to initialize a Google Cloud ML Diagnostics deferred run using `AXLEARN_JOB_NAME` and manage starting/stopping xprof tracing sessions. * Configure GKE launcher and TPU environment (`axlearn/cloud/gcp/tpu.py`, `axlearn/cloud/gcp/jobset_utils.py`) to inject `AXLEARN_JOB_NAME` into container environments and label pods with `managed-mldiagnostics-gke: true` when enabled. * Add `--enable_ml_diagnostics_xprof` and `--ml_diagnostics_region` flags to `axlearn/common/launch_trainer.py`. * Route profiler tracing in `SpmdTrainer` and `SpmdEvaler` through `ManagedMLDiagnostics` when `enable_ml_diagnostics_xprof` is active. * Add `axlearn/cloud/gcp/scripts/get_mldiag_urls.sh` helper script to extract profiler session Xprof URLs and Cloud Console URLs as JSON. * Add unit test coverage in `managed_mldiagnostics_test.py`, `trainer_test.py`, `evaler_test.py`, `launch_trainer_test.py`, and `jobset_utils_test.py`. TAG=agy CONV=2c9c481e-b3c4-463b-9064-6d33e10bb9cf
rapatchi
force-pushed
the
mldiag-integration
branch
from
September 2, 2026 16:37
dabc985 to
4e2ddab
Compare
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.
feat(mldiag): Add Google Cloud ML Diagnostics profiling (xprof) support
Introduce integration with
google_cloud_mldiagnosticsto support automatedprofiler (xprof) tracing on Google Cloud Platform.
ManagedMLDiagnosticssingleton (axlearn/common/managed_mldiagnostics.py)to initialize a Google Cloud ML Diagnostics deferred run using
AXLEARN_JOB_NAMEand manage starting/stopping xprof tracing sessions.
axlearn/cloud/gcp/tpu.py,axlearn/cloud/gcp/jobset_utils.py) to injectAXLEARN_JOB_NAMEinto containerenvironments and label pods with
managed-mldiagnostics-gke: truewhen enabled.--enable_ml_diagnostics_xprofand--ml_diagnostics_regionflags toaxlearn/common/launch_trainer.py.SpmdTrainerandSpmdEvalerthroughManagedMLDiagnosticswhen
enable_ml_diagnostics_xprofis active.managed_mldiagnostics_test.py,trainer_test.py,evaler_test.py,launch_trainer_test.py, andjobset_utils_test.py.