Skip to content

Add Google Cloud ML Diagnostics integration for profiling - #1371

Open
rapatchi wants to merge 1 commit into
apple:mainfrom
rapatchi:mldiag-integration
Open

Add Google Cloud ML Diagnostics integration for profiling#1371
rapatchi wants to merge 1 commit into
apple:mainfrom
rapatchi:mldiag-integration

Conversation

@rapatchi

@rapatchi rapatchi commented Jul 7, 2026

Copy link
Copy Markdown

feat(mldiag): Add Google Cloud ML Diagnostics profiling (xprof) support
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 unit test coverage in managed_mldiagnostics_test.py, trainer_test.py,
    evaler_test.py, launch_trainer_test.py, and jobset_utils_test.py.

@rapatchi
rapatchi requested a review from a team as a code owner July 7, 2026 14:17
@rapatchi
rapatchi force-pushed the mldiag-integration branch 5 times, most recently from 1376906 to 551d10d Compare July 10, 2026 08:28
@rapatchi
rapatchi requested a review from a team as a code owner July 10, 2026 08:28
@rapatchi
rapatchi force-pushed the mldiag-integration branch from 551d10d to c282ef8 Compare July 15, 2026 04:57
@rapatchi
rapatchi force-pushed the mldiag-integration branch 2 times, most recently from baa9425 to 320b919 Compare September 2, 2026 07:45
@rapatchi rapatchi changed the title Add Google Cloud ML Diagnostics integration for profiling and metrics Add Google Cloud ML Diagnostics integration for profiling Sep 2, 2026
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
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.

1 participant