Chuyển đến nội dung
Skillpedia
Triển khai và đám mây (DevOps)22k · #10269

gke-ai-troubleshooting-tpu-mxla-hang

Skill này làm gì

Skill này giúp agent AI chẩn đoán tình trạng treo khi huấn luyện trong các tác vụ Cloud TPU đa lát trên GKE. Skill dành cho kỹ sư ML có các lần huấn luyện dừng tiến triển mà không có lỗi rõ ràng.

Khi nào nên dùng

  • ✓Khi một tác vụ huấn luyện TPU đa lát ngừng tiến triển và log hiển thị HANG_DETECTED.
  • ✓Khi ML Diagnostics hiển thị sự kiện giám sát treo cho một tác vụ GKE TPU.
  • ✓Khi bạn cần biết một lần đứng có đến từ khác biệt khi khởi chạy của trình biên dịch hay từ đầu vào dữ liệu chậm.

Liên kết skill

https://github.com/google/skills/blob/main/skills/cloud/gke-ai-troubleshooting-tpu-mxla-hang/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/google/skills/blob/main/skills/cloud/gke-ai-troubleshooting-tpu-mxla-hang/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Tác vụ huấn luyện TPU của tôi trải trên nhiều lát đã ngừng tiến triển và log nhắc đến treo. Có gì sai vậy?”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent đọc log treo và báo cáo Hang Analyzer, rồi so sánh chúng với các chỉ số độ trễ đa lát 1 phút và nhãn node để thu hẹp nguyên nhân.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Troubleshoot GKE TPU multi-slice hangs with the MXLA Hang Analyzer

Diagnose Cloud TPU multi-slice training hangs on Google Kubernetes Engine (GKE) by correlating Megascale HANG_DETECTED logs and ML Diagnostics Workload Monitoring Megascale XLA (MXLA) Hang Analyzer reports with 1-minute multi-slice latency metrics (kubernetes.io/container/multislice/*) and GKE node topology labels.


Attribution

MUST READ: Before executing any gcloud, REST API, or MCP command, you MUST read Usage Attribution. For commands executed directly in the terminal (never in generated scripts, Terraform, or user code), prefix gcloud with CLOUDSDK_METRICS_REQUEST_ATTRIBUTION="agent-skills/1.0 (skill:gke-ai-troubleshooting-tpu-mxla-hang)" and append agent-skills/1.0 (skill:gke-ai-troubleshooting-tpu-mxla-hang) to User-Agent headers.

Prerequisites

  • Tools: Install the Google Cloud SDK (gcloud with alpha component for gcloud alpha mldiagnostics) and kubectl.
  • Cloud Billing & Project Configuration: Verify an active billing account is linked (gcloud billing projects describe {project_id}), authenticate (gcloud auth login), set the target project (gcloud config set project {project_id}), and ensure container.googleapis.com, logging.googleapis.com, monitoring.googleapis.com, and hypercomputecluster.googleapis.com are enabled.
  • Supported workloads and versions: Google Cloud ML Diagnostics only supports JAX on TPUs (see ML Diagnostics platform). Workload Monitoring is enabled by default, supports the jobset and job GKE job types, and is compatible with GKE versions 1.36.0-gke.4681000 and later (Configure GKE for ML Diagnostics, which also covers the cluster setup needed for on-demand profiling in Step 4 Path B). If a workload uses another framework (such as PyTorch) or another custom resource type, gcloud alpha mldiagnostics won't list ML runs or monitored events for it. The Megascale XLA hang analyzer and Megascale XLA metrics require LibTPU 0.40.0 or later (see "Get started" in Workload monitoring with ML Diagnostics).
  • Required IAM Roles:
    • Cluster Director Editor (roles/hypercomputecluster.editor), the role listed in the "IAM permissions" section of ML Diagnostics platform, for the ML Diagnostics CLI and API calls in this skill (ML runs, monitored events, and on-demand profiler sessions)
    • Monitoring Viewer (roles/monitoring.viewer) for the PromQL queries in Step 2
    • Logs Viewer (roles/logging.viewer) for the Cloud Logging query in Step 1
    • Kubernetes Engine Viewer (roles/container.viewer) for the kubectl get nodes query in Step 3
    • For remediation ([High Risk] steps): Kubernetes Engine Cluster Admin (roles/container.clusterAdmin)
  • Reference Documentation:
Câu hỏi thường gặp

Tác vụ đa lát là gì?

Đó là tác vụ huấn luyện chạy trên nhiều hơn một lát TPU.

Nó có cần công cụ đặc biệt nào được cài không?

Có. Nó cần Google Cloud SDK với thành phần alpha, kubectl, và thiết lập thanh toán cùng quyền API cho dự án.

Nó có sửa lỗi treo giúp tôi không?

Skill tập trung vào chẩn đoán. Nó chỉ ra nguyên nhân có khả năng để bạn quyết định bước tiếp theo.

Chi tiết

Mô tả gốc của tác giả

Diagnose GKE Cloud TPU multi-slice training hangs (Megascale `HANG_DETECTED` logs and hang monitored events) using the ML Diagnostics `Megascale XLA (MXLA) Hang Analyzer` (`gcloud alpha mldiagnostics monitored-events`) and 1-minute Cloud Monitoring multi-slice latency metrics (`kubernetes.io/container/multislice/*`). Distinguishes XLA compiler/HLO launch divergence and host data-input stalls from TPU chip, SparseCore, ICI, or network fabric faults. Use when multi-slice TPU training jobs freeze without progressing steps, emit `HANG_DETECTED`, or stall in collective operations. Don't use for gra

repo: google/skills

Độ phổ biến

Sao GitHub
22k
Vị trí xếp hạng
#10269
Giấy phép
Apache-2.0
Cập nhật
2/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự