Logo van Huawei Cloud Modelarts Training Diagnosis

Huawei Cloud Modelarts Training Diagnosis

Organisatie
huaweicloud
huawei-cloud-modelarts-training-diagnosis

Huawei Cloud ModelArts training job fault diagnosis skill. Uses hcloud CLI to call ModelArts training job log/event APIs, analyzes training job failures/timeouts/stuck jobs, locates customer training code issues, and provides diagnosis conclusions with fix suggestions and confidence levels. Scenarios: training job failure (status.phase=Failed), timeout (Timeout), abnormal (Abnormal), stuck jobs. Triggers: training job failure, training job timeout, training job stuck, ModelArts training diagnosis, 训练任务失败排查, 训练作业异常分析.

Overzicht

Uitgeverhuaweicloud
Repositoryhuaweicloud-skills
Skillnaamhuawei-cloud-modelarts-training-diagnosis
Sterren
59
Forks
24
Meegeleverde bestanden
8
LicentieMIT
Links
  • Instructies in Markdown

    Het model laadt het bestand SKILL.md alleen als dat nodig is. Dat kost dus alleen tokens als een verzoek daadwerkelijk bij de skill past.

  • Werkt met elk LLM

    AI-skills bestaan uit instructies in gewone Markdown, niet uit aanbiederspecifieke code. Daardoor werken ze met GPT, Claude, Gemini, Grok of een lokaal model.

  • Meegeleverde bestanden: 8

    Scripts, sjablonen en referentiemateriaal die het model tijdens het werken kan lezen. De bestanden kunnen alleen worden gelezen en worden nooit uitgevoerd.

  • Open source

    Gepubliceerd door huaweicloud op GitHub. Bekijk de bronbestanden voordat je de skill installeert.

Installatie

Installeer de AI-skill Huawei Cloud Modelarts Training Diagnosis in TypingMind om deze met elk LLM te gebruiken, of voeg de skill toe aan een andere agent die SKILL.md kan lezen.

1

Installeren in TypingMind

TypingMind installeert een skill rechtstreeks vanuit de GitHub-map. De app leest SKILL.md, bundelt de bijbehorende bestanden en slaat het resultaat lokaal op.

  1. Open de app en ga naar Plug-ins → Skills.
  2. Kies "Installeren via GitHub".
  3. Plak de onderstaande URL van de skillmap en bevestig.
    https://github.com/huaweicloud/huaweicloud-skills/tree/master/skills/ai/modelarts/huawei-cloud-modelarts-training-diagnosis
  4. Schakel de skill in voor elke chat waarin je de skill wilt kunnen gebruiken.
Plug-ins → Skills → Skill toevoegen → Via GitHub-URL. Plak vervolgens de map-URL en druk op Doorgaan.
2

Installeren in een andere agent

Elke agent die het Agent Skills-formaat kan lezen, kan deze skill gebruiken — kopieer de map naar de skillmap van die agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/huaweicloud/huaweicloud-skills.git /tmp/huaweicloud-skills
mkdir -p .claude/skills
cp -r /tmp/huaweicloud-skills/skills/ai/modelarts/huawei-cloud-modelarts-training-diagnosis .claude/skills/huawei-cloud-modelarts-training-diagnosis
Start Claude Code na het kopiëren opnieuw op, zodat de nieuwe skill wordt herkend.

Gebruik deze skill in TypingMind

Schakel Huawei Cloud Modelarts Training Diagnosis in voor een chat naar keuze in TypingMind en het model doet de rest. De naam en beschrijving staan in de systeemprompt. Zodra een verzoek bij de skill past, laadt het model zelf de volledige instructies. Je hoeft de skill nooit handmatig aan te roepen. Pas als het model de skill daadwerkelijk gebruikt, kost dat tokens.

Het model laadt Huawei Cloud Modelarts Training Diagnosis automatisch zodra een verzoek erbij past.

Werkt met elk AI-model

AI-skills zijn gewone Markdown-instructies in plaats van aanbiederspecifieke code. Daardoor is Huawei Cloud Modelarts Training Diagnosis niet gebonden aan het model waarvoor de skill is geschreven. Installeer de skill één keer in TypingMind en gebruik deze met GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama of een lokaal model dat je zelf draait — allemaal met je eigen API-sleutels.

  • Alleen geladen wanneer nodig

    De systeemprompt bevat alleen de naam en beschrijving. De instructies worden bij het eerste bijpassende verzoek opgehaald, dus een ongebruikte skill kost niets.

  • Wissel van model tijdens een chat

    Omdat de skill uit instructies bestaat en niet uit code, blijft deze werken als je van model wisselt — het volgende model leest hetzelfde SKILL.md-bestand.

Skillinstructies

Dit is de inhoud van SKILL.md die het model laadt. Lees deze vóór de installatie — een skill bestaat uit instructies die je model zal volgen.

ModelArts Training Job Fault Diagnosis

Overview

This skill provides automated fault diagnosis for Huawei Cloud ModelArts training jobs. It calls ModelArts log and event APIs via hcloud CLI to collect runtime information, analyzes training job failures/timeouts/stuck jobs, and outputs diagnosis conclusions with fix suggestions and confidence levels.

Architecture

User Input
    ↓
Phase 1: Task Discovery (ListTrainingJobs)
    ↓
Phase 2: Status Assessment (ShowTrainingJobDetails)
    ↓
[Early Exit if traceback found in status.task_statuses[].message]
    ↓ (if no traceback)
Phase 3: Information Collection
    ├─ Main Path: ListTrainingJobEvents, ListTrainingJobStages
    └─ Extended Path: ShowTrainingJobLogsPreview, ShowObsUrlOfTrainingJobLogs
    ↓
Phase 4: Analysis (confidence-based inference)
    ↓
Phase 5: Output (diagnosis report + fix suggestions)

Applicable Scenarios

  • Training job failure (status.phase = "Failed")
  • Training job timeout (status.phase = "Timeout")
  • Training job abnormal (status.phase = "Abnormal")
  • Training job stuck (running long time with no progress)
  • Resource shortage causing training failure

Typical Use Cases

  • "My training job failed, help me diagnose"
  • "Training job is stuck, no progress for hours"
  • "Training job timeout, what went wrong?"
  • "Scan all failed training jobs in my account"
  • "Training job error code 1.015, what does it mean?"

Prerequisites

hcloud CLI Installation

Authentication Configuration

  • AK/SK configured in ~/.hcloud/config.json
  • Default region: cn-north-4
  • project_id configured in profile
  • skipSecureVerify=true (for WSL environment)

Verification command:

bash
hcloud configure list

IAM Permissions

This skill requires read-only permissions for ModelArts training APIs.

Required permissions: See references/iam-policies.md

Permission failure handling:

  1. If any API returns 403/401, read references/iam-policies.md
  2. Display required permissions list and policy JSON to user
  3. Guide user to create custom policy in IAM console
  4. Pause execution until user confirms permissions are granted

KooCLI Command Format Standard

All commands follow the standard hcloud format:

bash
hcloud ModelArts <Operation> --param1=value1 --param2=value2 --cli-region=<region>

Key conventions:

  • Service name: ModelArts (PascalCase)
  • Operation name: PascalCase (e.g., ShowTrainingJobDetails)
  • Region parameter: --cli-region=<value> (default: cn-north-4)
  • Output format: --cli-output=json (for agent processing)
  • JMESPath filtering: --cli-query="<expression>" (to reduce output)

Example:

bash
hcloud ModelArts ShowTrainingJobDetails \
  --cli-region=cn-north-4 \
  --cli-output=json \
  --training_job_id="<TRAINING_JOB_ID>"

Workflow

This skill follows a 5-phase diagnosis workflow:

Phase 1: Task Discovery

  • If user provides full job ID → skip to Phase 2
  • If user provides name → use ListTrainingJobs to find ID + status.phase
  • If user provides nothing → scan all abnormal jobs (status.phase = "Failed"/"Timeout"/"Abnormal")

Phase 2: Status Assessment

  • Call ShowTrainingJobDetails to get job status
  • Check status.phase: "Failed"/"Timeout"/"Abnormal" = real fault, "Running"/"Success" = false alarm, "Initializing" = pending observation
  • Extract status.task_statuses[].task_id for subsequent log APIs
  • Early Exit: If status.task_statuses[].message contains full Python traceback, diagnosis can be completed at HIGH confidence without calling Phase 3 APIs

Phase 3: Information Collection (skipped if early exit applies)

Main path (always run):

  1. ShowTrainingJobDetails → status.phase, status.task_statuses[].message, status.task_statuses[].task_id, status.failureAnalysisResult
  2. ListTrainingJobEvents(level=Error) → error event list
  3. ListTrainingJobStages → check which stage is stuck

Extended path (conditional): 4. ShowTrainingJobLogsPreview → preview logs (find traceback/error lines) 5. ShowObsUrlOfTrainingJobLogs → OBS full log download link (5min valid)

Detailed flow: See references/diagnosis-flow.md

Core Commands

Task Discovery Commands

ListTrainingJobs — Scan all abnormal training jobs

bash
hcloud ModelArts ListTrainingJobs \
  --cli-region=cn-north-4 \
  --cli-output=json \
  --cli-query="items[?status.phase=='Failed' || status.phase=='Timeout' || status.phase=='Abnormal'].{job_id: metadata.id, name: metadata.name, phase: status.phase}"

Status Assessment Commands

ShowTrainingJobDetails — Get job status + error info

bash
hcloud ModelArts ShowTrainingJobDetails \
  --cli-region=cn-north-4 \
  --cli-output=json \
  --training_job_id="<TRAINING_JOB_ID>"

Key response fields:

  • metadata.id, metadata.name — job identifier
  • status.phase — job status ("Failed", "Running", "Success", etc.)
  • status.task_statuses[].message — full Python traceback or error message (primary evidence)
  • status.task_statuses[].exit_code — integer exit code
  • status.task_statuses[].task_id — task ID for log APIs
  • status.failureAnalysisResult.analysis_results[] — platform's automatic diagnosis

Information Collection Commands

ListTrainingJobEvents — Get error events

bash
hcloud ModelArts ListTrainingJobEvents \
  --cli-region=cn-north-4 \
  --cli-output=json \
  --level=Error \
  --limit=100 \
  --training_job_id="<TRAINING_JOB_ID>"

ListTrainingJobStages — Check stage checkpoints

bash
hcloud ModelArts ListTrainingJobStages \
  --cli-region=cn-north-4 \
  --cli-output=json \
  --training_job_id="<TRAINING_JOB_ID>"

ShowTrainingJobLogsPreview — Preview logs (find traceback)

bash
hcloud ModelArts ShowTrainingJobLogsPreview \
  --cli-region=cn-north-4 \
  --cli-output=json \
  --training_job_id="<TRAINING_JOB_ID>" \
  --task_id="<TASK_ID>"

ShowObsUrlOfTrainingJobLogs — Get OBS full log download link (5min valid)

bash
hcloud ModelArts ShowObsUrlOfTrainingJobLogs \
  --cli-region=cn-north-4 \
  --cli-output=json \
  --training_job_id="<TRAINING_JOB_ID>" \
  --task_id="<TASK_ID>"

Complete command templates: See references/hcloud-command-templates.md

Parameter Confirmation

Training Diagnosis Parameters

ParameterRequiredTypeDescriptionDefault
training_job_idYesStringTraining job ID (e.g., from ListTrainingJobs)None
task_idConditionalStringTask ID within training job (from ShowTrainingJobDetails.status.task_statuses[].task_id)None
--cli-regionNoStringHuawei Cloud regioncn-north-4
--cli-outputNoStringOutput format (json/table/tsv)json
--cli-queryNoStringJMESPath expression to filter outputNone

Notes:

  • task_id is required for log APIs, obtained from ShowTrainingJobDetails.status.task_statuses[].task_id
  • Region can be switched (e.g., cn-north-9, cn-east-3), but project_id must be configured for that region
  • Logs may contain sensitive information; only extract key error/traceback lines, do not display full logs

Output Format

This skill outputs diagnosis reports in Markdown format.

Output Template

markdown
## 诊断结论

| 项目 | 值 |
|------|-----|
| 任务 | `<metadata.name>` (`<metadata.id>`) |
| 当前状态 | `<status.phase>` |
| 故障级别 | Fault / Abnormal / 疑似异常 / 正常 |

## 根因

<一句话描述什么导致了作业失败>(置信度:HIGH/MEDIUM/LOW)

## 修复建议

### 方案 1

1. <step 1>
2. <step 2>

> 注意:以上操作涉及 [只读查询 / 需要用户确认后手动执行的变更]

## 后续步骤

[信息不足时] 当前信息不足以确定根因,建议补充以下信息:
- 调用 `<API>` 获取 `<field>`
- 或手动检查 `<environment/configuration>`

Strict constraint: Generate the report strictly following the template above. Keep analysis reasoning internal, not in the report.

Confidence Levels

  • HIGH: status.task_statuses[].message contains full Python traceback with identifiable root cause, or status.failureAnalysisResult.analysis_results[].description provides explicit error description, or events contain clear error
  • MEDIUM: Multiple indirect clues point to same root cause, or status.task_statuses[].exit_code non-zero but message is empty/vague
  • LOW: Insufficient information; must output "information insufficient" and list what additional information is needed

Detailed confidence rules: See references/confidence-rules.md

Verification Method

This skill follows a 3-tier verification approach:

Installation Verification

bash
hcloud version

Success criteria: Returns version >= 7.2.2

Configuration Verification

bash
hcloud configure list

Success criteria: Displays valid AK/SK configuration with region=cn-north-4

Function Verification

bash
hcloud ModelArts ListTrainingJobs --cli-region=cn-north-4

Success criteria: Returns HTTP 200 and training job list

Detailed verification steps: See references/verification-method.md

Best Practices

Early Exit Principle

  • If ShowTrainingJobDetails returns full Python traceback in status.task_statuses[].message, skip Phase 3 APIs (ListTrainingJobEvents, ListTrainingJobStages, ShowTrainingJobLogsPreview, ShowObsUrlOfTrainingJobLogs)
  • This saves API calls and speeds up diagnosis when root cause is already clear

Progressive Diagnosis

  • Start with minimal information (job ID only)
  • Run Phase 2 first (ShowTrainingJobDetails)
  • Only run Phase 3 APIs if Phase 2 results are insufficient (no traceback in message)
  • Avoid running all APIs at once; follow the 5-phase workflow

Evidence-Based Analysis

  • Every inference must point to specific fields from API responses
  • One evidence supports one inference; multiple evidence cross-validation increases confidence
  • When return information is vague or contains no explicit errors, output "unable to determine root cause based on current information"
  • Strictly prohibited: Guessing root causes without evidence

Log Handling

  • Logs may contain sensitive information (IP addresses, tokens, credentials)
  • Only extract key error/traceback lines for diagnosis
  • Do not display full logs in output
  • For complete logs, use ShowObsUrlOfTrainingJobLogs and prompt user to download (5min valid link)

Region Switching

  • Default region is cn-north-4
  • When switching regions, ensure project_id is configured for that region
  • Use hcloud configure init or explicitly pass --project_id if region profile lacks project_id

Reference Documents

DocumentFileDescription
API Catalogreferences/api-catalog.md6 training diagnosis APIs, status phases, response structure, event levels
Diagnosis Flowreferences/diagnosis-flow.md5-phase diagnosis workflow in detail with early exit principle
Command Templatesreferences/hcloud-command-templates.mdComplete hcloud command templates for each API
Confidence Rulesreferences/confidence-rules.mdConfidence level definitions, evidence mapping, output contracts
CLI Installation Guidereferences/cli-installation-guide.mdhcloud CLI installation, configuration, verification
IAM Policiesreferences/iam-policies.mdRequired IAM permissions and policy JSON
Verification Methodreferences/verification-method.md3-tier verification steps
Acceptance Criteriareferences/acceptance-criteria.mdPass/fail criteria for skill testing

Notes

Security Constraints

  1. Read-only throughout: Only call GET APIs (except ListTrainingJobs which uses POST for read-only list query); never call Create/Update/Delete/Stop
  2. No credential leakage: Never print AK/SK
  3. User confirmation required: If fix suggestions involve changes (restart, modify specs), must clearly prompt "requires user confirmation before manual execution"; never auto-execute
  4. Sensitive information masking: Logs may contain sensitive info; mask sensitive fields before output (e.g., desensitize IPs, do not print complete tokens)

Scope Limitations

  • Training job diagnosis only: Does not diagnose Notebook, inference services, or other scenarios
  • No code modification: Does not modify any business code or resources
  • No fabrication: Never fabricate root causes without evidence; must be based on API return fields
  • No private data access: Does not directly read private data in user repositories

Known Limitations

  • Some APIs may have rate limits; if throttled, wait and retry
  • Log preview may be truncated; use OBS link for complete logs
  • Metrics APIs removed from skill (can show state but cannot diagnose root causes)
  • status.task_statuses[].message may be empty for some failures; in such cases, Phase 3 APIs become necessary

Meegeleverde bestanden

Zolang de skill geladen is, leest het model deze bestanden als dat nodig is. Het model kan ze alleen lezen; ze worden nooit uitgevoerd.

Veelgestelde vragen

Wat doet de AI-skill Huawei Cloud Modelarts Training Diagnosis?

Huawei Cloud ModelArts training job fault diagnosis skill. Uses hcloud CLI to call ModelArts training job log/event APIs, analyzes training job failures/timeouts/stuck jobs, locates customer training code issues, and provides diagnosis conclusions with fix suggestions and confidence levels. Scenarios: training job failure (status.phase=Failed), timeout (Timeout), abnormal (Abnormal), stuck jobs. Triggers: training job failure, training job timeout, training job stuck, ModelArts training diagnosis, 训练任务失败排查, 训练作业异常分析.

Waarom Huawei Cloud Modelarts Training Diagnosis gebruiken in TypingMind?

Omdat je deze skill één keer installeert en met elk model kunt gebruiken. Huawei Cloud Modelarts Training Diagnosis bestaat uit gewone Markdown in plaats van aanbiederspecifieke code. Dezelfde skill werkt dus met GPT-5, Claude, Gemini, Grok of een lokaal model. Ook als je midden in een chat van model wisselt, blijft de skill werken. TypingMind werkt met je eigen API-sleutels, dus je betaalt aanbieders rechtstreeks in plaats van een abonnement per gebruikersplek af te sluiten. Je skills en chats blijven in je eigen opslag.

Hoe installeer ik Huawei Cloud Modelarts Training Diagnosis in TypingMind?

Open Plug-ins → Skills → Installeren vanaf GitHub in TypingMind en plak https://github.com/huaweicloud/huaweicloud-skills/tree/master/skills/ai/modelarts/huawei-cloud-modelarts-training-diagnosis. TypingMind leest het bestand SKILL.md, bundelt de bijbehorende bestanden en installeert het geheel als een skill die je per chat kunt inschakelen.

Welke AI-modellen kunnen Huawei Cloud Modelarts Training Diagnosis gebruiken?

Elk model dat je in TypingMind koppelt. AI-skills bestaan uit gewone Markdown-instructies in plaats van aanbiederspecifieke code. GPT, Claude, Gemini, Grok en lokale modellen kunnen deze skill dus allemaal laden wanneer een verzoek erbij past.

Hoeveel AI-modellen kan ik met Huawei Cloud Modelarts Training Diagnosis gebruiken?

Zoveel als je wilt. Je kunt Huawei Cloud Modelarts Training Diagnosis gebruiken met elk model dat skills ondersteunt, zoals GPT, Claude, Gemini, Grok, DeepSeek, Mistral of Llama. Allemaal in TypingMind met je eigen API-sleutels.

Is de AI-skill Huawei Cloud Modelarts Training Diagnosis gratis?

Ja. Deze skill is door huaweicloud op GitHub gepubliceerd onder de licentie MIT. Je betaalt alleen je eigen AI-aanbieder voor de tokens die je gebruikt.

Wat zijn AI-skills?

Een AI-skill is een herbruikbare bundel instructies die een AI-model leert hoe het één specifieke taak moet uitvoeren. De skill volgt het open Agent Skills-formaat: het bestand SKILL.md bevat de naam en beschrijving van de skill. Daarnaast kan de skill scripts, sjablonen of referentiebestanden bevatten die het model nodig heeft. Het model leest de instructies alleen als je verzoek bij de skill past. Een geïnstalleerde skill kost dus niets zolang deze niet wordt gebruikt.

Waarin verschillen AI-skills van plug-ins of MCP-servers?

Een plug-in of MCP-server geeft een model nieuwe tools om aan te roepen: code die ergens wordt uitgevoerd en een resultaat teruggeeft. Een AI-skill geeft het model juist kennis en een werkwijze: hoe het een taak moet aanpakken, welke stappen het moet volgen en hoe goede uitvoer eruitziet. Skills bestaan uit gewone Markdown en hebben dus geen server, API-sleutel of runtime nodig. Ze werken met elk model.

Bekijk alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇