Huawei Cloud Modelarts Training Diagnosis logo

Huawei Cloud Modelarts Training Diagnosis

Organization
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, 训练任务失败排查, 训练作业异常分析.

Overview

Publisherhuaweicloud
Repositoryhuaweicloud-skills
Skill namehuawei-cloud-modelarts-training-diagnosis
Stars
59
Forks
24
Bundled files
8
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 8 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by huaweicloud on GitHub. Read the source before you install it.

Installation

Install the Huawei Cloud Modelarts Training Diagnosis AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/huaweicloud/huaweicloud-skills/tree/master/skills/ai/modelarts/huawei-cloud-modelarts-training-diagnosis
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

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
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Huawei Cloud Modelarts Training Diagnosis in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Huawei Cloud Modelarts Training Diagnosis on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Huawei Cloud Modelarts Training Diagnosis is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Huawei Cloud Modelarts Training Diagnosis AI skill do?

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, 训练任务失败排查, 训练作业异常分析.

Why use Huawei Cloud Modelarts Training Diagnosis on TypingMind?

Because you install it once and use it with any model. Huawei Cloud Modelarts Training Diagnosis is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Huawei Cloud Modelarts Training Diagnosis in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/huaweicloud/huaweicloud-skills/tree/master/skills/ai/modelarts/huawei-cloud-modelarts-training-diagnosis. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Huawei Cloud Modelarts Training Diagnosis?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Huawei Cloud Modelarts Training Diagnosis?

As many as you like. As long as a model supports skills, you can use Huawei Cloud Modelarts Training Diagnosis with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Huawei Cloud Modelarts Training Diagnosis AI skill free?

Yes. It is published on GitHub by huaweicloud under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇