Refactor TPU Observability DAGs to Remove Dynamic Task Mapping - #264
Open
yuna-tzeng wants to merge 5 commits into
Open
Refactor TPU Observability DAGs to Remove Dynamic Task Mapping#264yuna-tzeng wants to merge 5 commits into
yuna-tzeng wants to merge 5 commits into
Conversation
…lity to standard Python functions to remove .expand() implement - Remove `@task` decorators from internal validation helper functions (`verify_table_amount`, `validate_chips_table`, etc.) in `tpu_info_format_validation_dags.py`. - Remove `@task` decorator from `parse_tpu_info_output` in `tpu_info_util.py` since it is only executed as an inline utility in active DAGs. - Refactor verification execution logic in `tpu_info_metrics_dag.py` and `tpu_sdk_monitoring_validation_dag.py` to process pods sequentially within a single task, removing complex dynamic task mapping (`expand` / `partial`) to avoid quota issues and scheduler overhead.
…U observability DAGs
yuna-tzeng
requested review from
alfredyu-cienet,
andrewyct,
severus-ho and
xibinliu
as code owners
May 27, 2026 03:24
Collaborator
|
FYI, Kim's change has been merged, so let's rebase this PR and resolve conflicts |
4 tasks
alfredyu-cienet
force-pushed
the
dev
branch
4 times, most recently
from
June 8, 2026 08:58
4af284a to
a9fa8fb
Compare
alfredyu-cienet
force-pushed
the
dev
branch
4 times, most recently
from
June 17, 2026 08:08
f8824db to
09c9e42
Compare
alfredyu-cienet
force-pushed
the
dev
branch
2 times, most recently
from
June 30, 2026 03:06
6663e92 to
95e3699
Compare
alfredyu-cienet
left a comment
Collaborator
There was a problem hiding this comment.
maybe we can apply TaskGroupWithTimeout for those DAGs in this PR as well?
| create_node_pool, | ||
| *startup.tasks, | ||
| all_verification_groups, | ||
| all_verification_tasks, |
Collaborator
There was a problem hiding this comment.
Suggested change
| all_verification_tasks, | |
| *all_verification_tasks, |
alfredyu-cienet
force-pushed
the
dev
branch
5 times, most recently
from
July 8, 2026 07:19
7aeded5 to
d43f051
Compare
alfredyu-cienet
force-pushed
the
dev
branch
2 times, most recently
from
July 14, 2026 03:12
a577785 to
71b8d8a
Compare
alfredyu-cienet
force-pushed
the
dev
branch
4 times, most recently
from
July 23, 2026 01:43
b588728 to
0e938b1
Compare
alfredyu-cienet
force-pushed
the
dev
branch
2 times, most recently
from
July 27, 2026 07:46
54f9a78 to
8e4ea82
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.
Description
This PR refactors the TPU observability DAGs to remove Airflow dynamic task mapping (the .expand() pattern). Instead, validations and operations across multiple pods are now executed sequentially inside a single Airflow task. This change simplifies the DAG structure, improves task-level logging, and streamlines error handling.
Removal of Dynamic Task Mapping (.expand())
Converted tasks that previously targeted a single pod using dynamic task mapping to accept a list of pod names (list[str]) and process them sequentially.
Removed complex nested TaskGroup structures and the usage of .zip() and chain(), resulting in cleaner and more maintainable DAG graphs.
Removed the @task decorator from parsing and helper validation functions (such as parse_tpu_info_output, validate_chips_table, validate_runtime_table, validate_tensorcore_table, and validate_latency_table), converting them back to standard Python functions to reduce Airflow task instantiation overhead.
Modified Files & Implementation Details
dags/tpu_observability/jobset_ttr_kill_process.py
kill_tpu_pod_workloadtokill_tpu_pod_workloads, taking pod_names: list[str].dags/tpu_observability/tpu_info_format_validation_dags.py
validate_tpu_info_formattask to coordinate the tpu-info execution, parsing, and format checks for all pods.dags/tpu_observability/tpu_info_metrics_dag.py
get_tpu_info_metric_from_podandrun_metric_verificationtasks.verify_metric_for_all_podstask to sequentially execute tpu-info --metric, parse outputs, query Cloud Monitoring, and run validation strategies for all pods.dags/tpu_observability/tpu_sdk_monitoring_validation_dag.py
dags/tpu_observability/utils/tpu_info_util.py
Checklist
Before submitting this PR, please make sure (put X in square brackets):