Skip to content

feat: automate image builds with different libtpu version daily and enhance JobSet DAG validations - #246

Open
yuna-tzeng wants to merge 19 commits into
devfrom
tpu-obs/user/yuna/cloud_build_libtpu_nightly
Open

feat: automate image builds with different libtpu version daily and enhance JobSet DAG validations#246
yuna-tzeng wants to merge 19 commits into
devfrom
tpu-obs/user/yuna/cloud_build_libtpu_nightly

Conversation

@yuna-tzeng

@yuna-tzeng yuna-tzeng commented Apr 23, 2026

Copy link
Copy Markdown

Description

This PR introduces an automated pipeline for building and pushing libtpu images and significantly enhances the validation process within our TPU observability DAGs.

  1. Automated libtpu CI/CD (Cloud Build)
    Implemented a Cloud Build pipeline to automate the daily building and pushing of libtpu images to GCP.

    Introduced a dual-track image strategy:
    Stable: Reliable builds for production consistency.
    Nightly: Latest builds to catch regressions early.

  2. Enhanced DAG Validation Logic
    Refactored tpu_info_format_validation_dag and related JobSet DAGs to sequentially validate both stable and nightly images within a single execution cycle.

    Infrastructure Optimization: Updated the workflow to create the TPU node pool once and reuse it for multiple image validations, reducing overall test duration and resource overhead.

    Expanded tpu-info table verification to include:
    TPU Inbound Buffer Transfer Latency
    TPU gRPC TCP Minimum RTT
    TPU gRPC TCP Delivery Rate

Tests

Airflow/Composer

  • GCP Composer name: yuna-ml-auto (under GCP project: cloud-ml-auto-solutions)
  • GCP Composer version: 2.13.1

Required file in GCS bucket ml-auto-solutions-dag-configs/tpu_observability

  • dag_config.yaml
  • jobset_config.yaml

Checklist

Before submitting this PR, please make sure (put X in square brackets):

  • I have performed a self-review of my code.
  • I have necessary comments in my code, particularly in hard-to-understand areas.
  • I have run one-shot tests and provided workload links above if applicable.
  • I have made or will make corresponding changes to the doc if needed.

@yuna-tzeng yuna-tzeng changed the title Tpu obs/user/yuna/cloud build libtpu nightly feat: automate image builds with different libtpu version daily and enhance JobSet DAG validations Apr 24, 2026
resources, including the JobSet and the temporary node pools.
""",
) as dag:
docker_images = {

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.

since we are adding one additional test

please provide the total execution time, for reviewing the dagrun_timeout

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

According to my test result, I expect the execution time to be around 30 minutes as well.
image

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.

for the one you provide, I'd say that's pretty close to 30, might need to set a longer timeout
as for the other ones, please double check

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Most libtpu DAGs I checked finish within 30 minutes.
I don't have the resources to test the node pool creation flow right now, so I’m letting it run in the test env for a few days to gather more timing data.
If you're worried about the 30-minute limit, I think we can go with 40 minutes instead.
The node pool creation time is the biggest variable here.

image image image

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.

let's do 45

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

update tpu_info_format_validation_dags and tpu_info_metrics_dag DAG timeout to 45

@alfredyu-cienet
alfredyu-cienet force-pushed the dev branch 4 times, most recently from b81c30b to a12e062 Compare May 5, 2026 01:16
@alfredyu-cienet
alfredyu-cienet force-pushed the dev branch 3 times, most recently from 721afcd to 8eb5556 Compare May 14, 2026 07:49
@yuna-tzeng
yuna-tzeng force-pushed the tpu-obs/user/yuna/cloud_build_libtpu_nightly branch from 94e6e2b to a54d4c8 Compare May 14, 2026 09:38
Comment thread dags/common/vm_resource.py Outdated
Comment on lines +401 to +402
TPU_OBS_LIBTPU_NIGHTLY = "us-west1-docker.pkg.dev/cienet-cmcs/tpu-obs-cloud-build/libtpu-nightly:latest"
TPU_OBS_LIBTPU_STABLE = "us-west1-docker.pkg.dev/cienet-cmcs/tpu-obs-cloud-build/libtpu-stable:latest"

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.

Suggested change
TPU_OBS_LIBTPU_NIGHTLY = "us-west1-docker.pkg.dev/cienet-cmcs/tpu-obs-cloud-build/libtpu-nightly:latest"
TPU_OBS_LIBTPU_STABLE = "us-west1-docker.pkg.dev/cienet-cmcs/tpu-obs-cloud-build/libtpu-stable:latest"
LIBTPU_NIGHTLY = (
"us-west1-docker.pkg.dev/cienet-cmcs/tpu-obs-cloud-build/libtpu-nightly:"
"latest"
)
LIBTPU_STABLE = (
"us-west1-docker.pkg.dev/cienet-cmcs/tpu-obs-cloud-build/libtpu-stable:"
"latest"
)

resources, including the JobSet and the temporary node pools.
""",
) as dag:
docker_images = {

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.

let's do 45

Comment on lines 569 to +576
# TODO(b/481177412): Re-enable and validate latency metrics.
# Current Monitoring API aggregation differs from tpu-info, making it
# unsuitable as a Source of Truth. Investigation for a valid verification
# method is ongoing.
# BufferTransferLatencyStrategy(),
# HostToDeviceTransferLatenciesStrategy(),
# DeviceToHostTransferLatenciesStrategy(),
# CollectiveEndToEndLatencyLatenciesStrategy(),
BufferTransferLatencyStrategy(),
HostToDeviceTransferLatenciesStrategy(),
DeviceToHostTransferLatenciesStrategy(),
CollectiveEndToEndLatencyLatenciesStrategy(),

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.

question, does Google aware of we disabled those tests in automation?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

No, I don't think they looked that closely into our DAG

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I uncommented this section because Victor mentioned recently that there were updates in the latest tpu-info, I want to validate it with automation.
https://b.corp.google.com/issues/481177412#comment5

I provided him with a manual test report comparing the differences between versions 0.10.0 and 0.11.0.
https://docs.google.com/document/d/1hF8yziLPsc7gcCgp9v5pcopkEOus_K4v_451N7rglbU/edit?pli=1&tab=t.0

However, the P99 metrics still show some discrepancies, which I also brought up to Victor during our meeting last week and he will take a look.

@yuna-tzeng
yuna-tzeng force-pushed the tpu-obs/user/yuna/cloud_build_libtpu_nightly branch from 83622e9 to 1b87ff6 Compare May 20, 2026 02:27
@alfredyu-cienet
alfredyu-cienet force-pushed the dev branch 2 times, most recently from a529792 to 83f8b37 Compare May 26, 2026 07:41
@yuna-tzeng
yuna-tzeng force-pushed the tpu-obs/user/yuna/cloud_build_libtpu_nightly branch from 1b87ff6 to dbdc16b Compare May 28, 2026 07:22
- Add TPU_OBS_LIBTPU_ image to vm_resource for environment testing.
- Update tpu_info_utils logic to support parsing the latest tpu-info output format.
- Add a new DAG to validate compatibility across different TPU images.
…testing

Updated the tpu-info format validation DAG to include new network and latency
metrics, and refactored the workflow to test multiple libtpu images.

Changes:
- Added new expected tables to `verify_table_amount`:
  - "TPU Inbound Buffer Transfer Latency"
  - "TPU gRPC TCP Minimum RTT"
  - "TPU gRPC TCP Delivery Rate"
- Note: "Host Compute Latency Status" is currently commented out as the
  metric is broken even in manual testing.
- Refactored DAG to run sequential validations for both 'stable' and
  'nightly' libtpu Docker images daily.
- Optimized node pool usage by creating the infrastructure once and
  running multiple workloads before cleanup.
Explicitly specify the stable Docker image when building jobsets in:
- jobset_ttr_kill_process.py
- jobset_ttr_node_pool_resize.py
- jobset_ttr_pod_delete_exist.py
- jobset_ttr_pod_delete.py
- jobset_ttr_rollback.py
- jobset_uptime_validation.py

This ensures we are using a known stable image for these validation tests.
@yuna-tzeng
yuna-tzeng force-pushed the tpu-obs/user/yuna/cloud_build_libtpu_nightly branch from dbdc16b to 8a83f06 Compare May 28, 2026 08:19
@alfredyu-cienet
alfredyu-cienet force-pushed the dev branch 4 times, most recently from 4af284a to a9fa8fb Compare June 8, 2026 08:58
@alfredyu-cienet
alfredyu-cienet force-pushed the dev branch 4 times, most recently from f8824db to 09c9e42 Compare June 17, 2026 08:08
@alfredyu-cienet
alfredyu-cienet force-pushed the dev branch 5 times, most recently from d242c8d to f76e189 Compare July 3, 2026 08:25
@alfredyu-cienet
alfredyu-cienet force-pushed the dev branch 3 times, most recently from d43f051 to a577785 Compare July 9, 2026 08:48
@alfredyu-cienet
alfredyu-cienet force-pushed the dev branch 4 times, most recently from ccd7f71 to b588728 Compare July 21, 2026 01:14
@alfredyu-cienet
alfredyu-cienet force-pushed the dev branch 3 times, most recently from 54f9a78 to 8e4ea82 Compare July 27, 2026 07:46
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.

2 participants