Huawei Cloud Modelarts Training Management 标志

Huawei Cloud Modelarts Training Management

组织
huaweicloud
huawei-cloud-modelarts-training-management

Manage Huawei Cloud ModelArts training jobs and related resources through full lifecycle operations via hcloud CLI. Covers 52 API interfaces across 8 functional domains: training job management, algorithm management, training job tags, training experiments, training job events, model import, auto search (hyperparameter tuning), and training image save. All write operations require user confirmation before execution. Triggers include: "ModelArts training", "训练作业", "模型训练", "创建训练作业", "查询训练作业", "停止训练作业", "删除训练作业", "算法管理", "超参配置", "training job", "training management", "create training", "ModelArts 训练", "训练实验", "自动搜索", "超参调优".

Add to TypingMind

概览

发布者huaweicloud
代码仓库huaweicloud-skills
技能名称huawei-cloud-modelarts-training-management
星标数
59
复刻数
24
附带文件
10
许可协议MIT
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 10 个附带文件

    模型执行任务时可读取的脚本、模板和参考资料。这些文件为只读文件,绝不会被执行。

  • 开源

    由 huaweicloud 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Huawei Cloud Modelarts Training Management AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/huaweicloud/huaweicloud-skills/tree/master/skills/ai/modelarts/huawei-cloud-modelarts-training-management
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

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-management .claude/skills/huawei-cloud-modelarts-training-management
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Huawei Cloud Modelarts Training Management,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Huawei Cloud Modelarts Training Management。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Huawei Cloud Modelarts Training Management 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

Huawei Cloud ModelArts Training Management

Full lifecycle management for ModelArts training jobs and related resources via hcloud CLI — 52 API interfaces across 8 functional domains.


Overview

This skill enables users to manage Huawei Cloud ModelArts training jobs and related resources through the hcloud CLI. It covers the complete training lifecycle including training job CRUD, algorithm management, training experiments, auto search (hyperparameter tuning), model import, and training image save.

Architecture

User Request → Agent → hcloud ModelArts <Operation> --cli-region={region} [--params] → Huawei Cloud ModelArts API

Applicable Scenarios

  • Training Job Management: Create, list, show, stop, delete training jobs; query logs, metrics, engines, flavors, quotas
  • Algorithm Management: Create, list, show, update, delete training algorithms; publish to gallery
  • Training Job Tags: Create, show, delete tags for training jobs
  • Training Experiments: Create, list, show, update, delete, check training experiments
  • Training Job Events: Query job events, stages, tasks; list system events and scheduled events
  • Model Import: Import, list, show, delete AI models; create ModelArts agency
  • Auto Search: Query hyperparameter search trials, parameters analysis, yaml templates
  • Training Image Save: Create and query training job image save tasks

Prerequisites

  1. hcloud CLI installed and authenticated — Reference: https://support.huaweicloud.com/qs-hcli/hcli_02_003.html
  2. Huawei Cloud AK/SK configured via hcloud (see Security & Credential Check below)
  3. ModelArts service enabled in the target region
  4. IAM permissions — See references/iam-policies.md

Security & Credential Check

⚠️ CRITICAL: This section defines the agent's security boundary. Follow it strictly.

🔒 Security Rules (MANDATORY)
  • 🚫 NEVER read, echo, or print AK/SK values (e.g., cat ~/.hcloud/config.json, echo $HW_ACCESS_KEY is FORBIDDEN)
  • 🚫 NEVER read or cat credential files such as ~/.hcloud/config.json or any file that may contain secrets
  • 🚫 NEVER ask the user to input AK/SK directly in the conversation or command line
  • 🚫 NEVER execute hcloud configure set --cli-access-key=... --cli-secret-key=... — credential configuration is the user's responsibility, done outside the agent session
  • 🚫 NEVER pass --cli-access-key/--cli-secret-key on every API call — they will be exposed in process listings (ps aux) for the entire request duration
  • ✅ ALWAYS use hcloud configure list to check credential status (presence check only, not values)
  • ✅ If no valid profile exists, STOP and instruct the user to configure credentials outside this session
  • ✅ Recommend using IAM user with minimal permissions instead of main account
✅ Agent Credential Check (the ONLY acceptable check)
bash
# Step 1: Check credential status — presence only, not values
hcloud configure list
  • ✅ Expected: Shows a valid profile with mode: AKSK

  • ❌ If empty/invalid → Guide the user with the 3-step process below:

    Step-by-step guidance (copy-paste for the user):

    "No valid credentials found. Please follow these 3 steps in your terminal:"

    ① Get your AK/SK Log in to Huawei Cloud Console → IAM → Access Keys. If you don't have one, click "Create Access Key" and save it securely.

    ② Run this in your terminal (one-time setup):

    bash
    hcloud configure set --cli-access-key=<YOUR_AK> --cli-secret-key=<YOUR_SK>

    (Replace <YOUR_AK> and <YOUR_SK> with the values from step ①)

    ③ Come back and tell me "configured", I'll verify it works.

    Note: The configure set command stores your credentials in ~/.hcloud/config.json. After that, all hcloud commands use them automatically — no need to pass AK/SK again.

    Agent: DO NOT execute any configure set command yourself.

🔧 User's Responsibility (for documentation, NOT agent execution)

The user configures credentials outside the agent session (in their own terminal):

bash
# One-time setup — run this in your terminal, NOT in the agent chat
HISTCONTROL=ignorespace
 hcloud configure set --cli-access-key=<YOUR_AK> --cli-secret-key=<YOUR_SK>

⚠️ Note: hcloud CLI does NOT read HW_ACCESS_KEY/HW_SECRET_KEY environment variables (those are for Python SDK only). hcloud configure set is the only supported credential configuration method.


Workflow

Step 1: Identify the Operation

Determine which training operation the user needs based on their request:

User IntentOperation Category
Create/list/show/stop/delete training jobsTraining Job Management
Create/list/show/update/delete algorithmsAlgorithm Management
Create/show/delete training job tagsTraining Job Tags
Create/list/show/update/delete experimentsTraining Experiments
Query job events, stages, tasksTraining Job Events
Import/list/show/delete modelsModel Import
Query auto search trials, params analysisAuto Search
Save training job imageTraining Image Save

Step 2: Execute CLI Command

bash
hcloud ModelArts <Operation> --cli-region={region} [--key=value ...]

{region} must be replaced with the actual region, e.g., cn-north-4. Do NOT hardcode the region.

Step 2.5: ⚠️ Pre-Flight Check (MANDATORY for Write Operations)

Before executing ANY write operation (Create/Update/Delete/Stop/Change/Patch/Notify/Accept), you MUST:

  1. Read references/known-issues.md — Scan the relevant section for the target API
  2. Apply documented workarounds — Especially for the following high-risk operations:
OperationCritical IssueAction Required
CreateTrainingJobMust use v2 kind/metadata/spec/tasks formatUse --cli-jsonInput with v2 JSON structure
CreateTrainingJob (dedicated pool)flavor_id not accepted for dedicated poolsOmit flavor_id, specify pool_id instead
CreateAlgorithmJSON must use nested metadata + job_config structureUse --cli-jsonInput with correct nesting (see known-issues #27)
CreateAlgorithmOBS code directory must exist and be accessibleVerify OBS path before calling API
StopTrainingJobCan only stop jobs in creating/waiting/running stateCheck job status first
CreateModelsource_location format must be obs://bucket/path/Verify OBS path format
CreateModelmodel_type must be a valid valueCheck known-issues #22 for valid values
CreateSaveImageJobRequires job in running state; SWR namespace requiredVerify job status and SWR config
ChangeAlgorithmMust include --metadata.name parameterAdd metadata.name to request
NotifyTrainingJobInformationParameter names differ from API docsCheck known-issues #24
UpdateTrainingJobNot a valid CLI operationUse ChangeTrainingJob instead

Skipping this step will cause preventable failures. Every issue in the table was discovered through real API testing.

Step 3: Pricing Inquiry (for chargeable operations)

Before executing chargeable write operations (CreateTrainingJob on public resource pool, CreateTrainingExperiment), perform a BSS pricing inquiry to show estimated costs to the user.

📖 For detailed pricing inquiry procedures, read references/pricing-inquiry.md

Chargeable Operations
OperationNeeds InquiryCondition
CreateTrainingJob✅ YesWhen using public resource pool (no pool_id specified)
CreateTrainingJob❌ NoWhen using dedicated resource pool (pool_id specified — pool already billed)
CreateTrainingExperiment✅ YesExperiments may launch training jobs with compute costs
All other operations❌ NoRead operations, deletes, stops, tags, etc. do not incur charges
Inquiry Workflow
1. Detect chargeable operation (CreateTrainingJob without pool_id)
2. Extract flavor_id from spec.resource.flavor_id parameter
3. Get project ID via IAM KeystoneListAuthProjects
4. Call BSS ListOnDemandResourceRatings to query on-demand price
5. Calculate estimated cost: unit_price × node_count × estimated_duration
6. Display price table and cost estimate to user
7. Proceed to Step 4 (user confirmation) after showing pricing info
Quick Pricing Query

Use the helper script for quick price queries:

bash
# Query single flavor
bash scripts/query-pricing.sh --region cn-north-4 --flavor modelarts.bm.gpu.v100

# Query multiple flavors for comparison
bash scripts/query-pricing.sh --region cn-north-4 --flavor modelarts.bm.gpu.v100 --flavor modelarts.cpu.8u32g --flavor modelarts.bm.ascend910
BSS Inquiry Parameters (Fixed)
ParameterValueDescription
cloud_service_typehws.service.type.modelartsModelArts service type
resource_typehws.resource.type.modelartsModelArts resource type
usage_measure_id4Hour (billing unit)
size_measure_id14Instance count
BSS API regioncn-north-1BSS API always uses cn-north-1

Step 4: Handle Write Operations

For all write operations (Create/Update/Delete/Stop/Change/Patch/Notify/Accept/Batch), prompt the user for confirmation before execution. For chargeable operations, confirmation includes reviewing the pricing information from Step 3.

Step 5: Generate Console URL (after CreateTrainingJob)

After successfully creating a training job, generate and display the ModelArts console URL so the user can directly access the job details in the web console.

URL Format

Training job detail page (after CreateTrainingJob):

https://console.huaweicloud.com/modelarts/?region={region}#/training/detail/{job_id}

Training job list page (after ListTrainingJobs):

https://console.huaweicloud.com/modelarts/?region={region}#/training
ComponentDescriptionExample
{region}The region where the job was createdcn-north-4
{job_id}Training job ID returned by CreateTrainingJob39cefbeb-0d86-46cb-a55a-fe6a62f3529b

Important: Use #/training/detail/{job_id} for detail and #/training for list (new console paths). Do NOT use #/trainingJobs/details/{job_id} or #/trainingJobs — those are deprecated old console paths.

Workflow
1. CreateTrainingJob returns job_id in the response
2. Construct console URL: https://console.huaweicloud.com/modelarts/?region={region}#/training/detail/{job_id}
3. Display the URL to the user with a summary of the created job
Example Output
✅ Training job created successfully!

  Job Name:    my-training-job
  Job ID:      39cefbeb-0d86-46cb-a55a-fe6a62f3529b
  Status:      creating
  Region:      cn-north-4

  🔗 Console URL:
  https://console.huaweicloud.com/modelarts/?region=cn-north-4#/training/detail/39cefbeb-0d86-46cb-a55a-fe6a62f3529b

Note: The console URL uses hash routing (#/training/detail/{job_id}). Do NOT use the old path #/trainingJobs/details/{job_id} — it redirects to a deprecated console page. The URL is valid as long as the training job exists and the user has ModelArts access permissions for the region.


KooCLI Command Format Standard

bash
hcloud ModelArts <Operation> --cli-region={region} [--key=value ...]
FeatureDescriptionExample
Service nameFixed: ModelArtsModelArts
Operation namePascalCaseListTrainingJobs, CreateTrainingJob
Region parameter--cli-region={region}--cli-region=cn-north-4
Simple parameter--key=value--training_job_id=xxx
Indexed parameter--key.1=value1--tasks.1.role=worker
project_idAuto-resolved if omittedUses configured project ID

Note: --project_id is auto-resolved from authentication credentials if omitted. Include it explicitly only when targeting a specific project.

Complex parameters: For complex nested parameters (e.g., config, spec), use --cli-jsonInput=/path/to/file.json. The JSON file must wrap body in {"body": {...}} envelope.


Core Commands

All 52 CLI command examples across 8 functional domains are documented in a separate reference file.

📖 For detailed command syntax, parameters, and examples, read references/cli-command-examples.md

Quick Index

#DomainAPIsKey Operations
1Training Job Management14CreateTrainingJob, ListTrainingJobs, ShowTrainingJobDetails, StopTrainingJob, DeleteTrainingJob, ShowTrainingJobLogs/Metrics/Engines/Flavors/Quotas
2Algorithm Management7CreateAlgorithm, ListAlgorithms, ShowAlgorithmByUuid, ChangeAlgorithm, DeleteAlgorithm, ShowSearchAlgorithms, CreateAlgorithmVersionToGallery
3Training Job Tags3CreateTrainJobTags, ShowTrainJobTags, DeleteTrainJobTags
4Training Experiments6CreateTrainingExperiment, List/Show/Delete/Change/Check experiments
5Training Job Events7ListTrainingJobEvents/Stages/Tasks, ListEvents/Categories/ScheduledEvents, AcceptScheduledEvent
6Model Import6CreateModel, ListModels, ShowModel, DeleteModel, ShowModelEngineAndRuntime, CreateModelArtsAgency
7Auto Search7ShowAutoSearchTrials/PerTrial/ParamsAnalysis/YamlTemplates, ShowAutoSearchTrialEarlyStop
8Training Image Save2CreateSaveImageJob, ShowSaveImageJob

When executing any command, always refer to the reference file for exact parameter names, required/optional flags, and usage patterns.


Capability Boundary(能力边界)

This skill covers only ModelArts training management — 52 APIs across 8 functional domains (see Core Commands above). The following ModelArts capabilities are NOT supported:

Unsupported DomainExample OperationsSuggestion
Notebook (Dev Environment)CreateNotebook, ListNotebooks, ShowNotebookUse ModelArts console or dedicated notebook skill
Inference Service (Online Service)CreateService, ListServices, ShowServiceUse ModelArts console or inference skill
Resource Pool / ClusterCreateResourcePool, ListResourcePoolsUse ModelArts console
Workflow OrchestrationCreateWorkflow, ListWorkflowsUse ModelArts console
Image Management (SWR)ListImages, ShowImageUse SWR console or CLI directly
DevServerCreateDevServer, ListDevServersUse ModelArts console
Workspace ManagementCreateWorkspace, ListWorkspacesUse ModelArts console

When receiving requests for the above unsupported capabilities, explicitly inform the user that this skill does not support them, and suggest using the ModelArts console (https://console.huaweicloud.com/modelarts/) or the relevant dedicated skill.


Parameter Confirmation

ParameterRequiredDescriptionExample
{region}YesHuawei Cloud regioncn-north-4, cn-east-3
{training_job_id}Job opsTraining job UUIDxxx-xxx-xxx
{algorithm_id}Algorithm opsAlgorithm UUIDxxx-xxx-xxx
{experiment_id}Experiment opsTraining experiment UUIDxxx-xxx-xxx
{model_id}Model opsModel UUIDxxx-xxx-xxx
{job_id}SaveImage opsSave image job UUIDxxx-xxx-xxx
{project_id}No (auto)Project ID, auto-resolved if omittedOmit for default
{workspace_id}NoWorkspace IDOmit for default workspace

SDK Fallback

If a CLI operation fails due to a CLI bug, fall back to SDK:

python
from huaweicloudsdkcore.auth.credentials import BasicCredentials
from huaweicloudsdkmodelarts.v2.modelarts_client import ModelArtsClient
from huaweicloudsdkmodelarts.v2.region.modelarts_region import ModelArtsRegion

credentials = BasicCredentials(ak="{AK}", sk="{SK}", project_id="{project_id}")
client = ModelArtsClient.new_builder() \
    .with_credentials(credentials) \
    .with_region(ModelArtsRegion.value_of("{region}")) \
    .build()

Reference Documents

DocumentDescription
references/cli-command-examples.mdDetailed CLI command syntax and examples for all 52 APIs
references/pricing-inquiry.mdBSS on-demand pricing inquiry for training jobs (pre-creation cost estimation)
references/iam-policies.mdLeast-privilege IAM policies
references/verification-method.mdVerification and testing methods
references/dataflow-diagram.mdMermaid data flow diagram
references/acceptance-criteria.mdAcceptance criteria checklist
references/api-paths.mdREST API paths from SDK source
references/cli-installation-guide.mdCLI installation and authentication guide
references/known-issues.mdKnown issues and workarounds

Known Issues Summary

  • Complex nested params: Use --cli-jsonInput with JSON file for CreateTrainingJob, CreateAlgorithm, CreateModel, etc.
  • --cli-jsonInput syntax: Use file path directly (no @ prefix), JSON must be wrapped in {"body": {...}}
  • Training job logs: ShowObsUrlOfTrainingJobLogs returns a temporary OBS URL (valid for 5 minutes)
  • StopTrainingJob: Can only stop jobs in creating, waiting, or running state
  • Auto search: Trial early stop only works on running trials

See references/known-issues.md for full details.


Notes

  • All write operations (Create/Update/Delete/Stop/Change/Patch/Notify/Accept) require user confirmation before execution
  • Pricing inquiry: CreateTrainingJob (public pool) and CreateTrainingExperiment trigger BSS pricing inquiry before execution — see references/pricing-inquiry.md
  • Dedicated resource pool: Training jobs using a dedicated resource pool (pool_id specified) do NOT require pricing inquiry — the pool is already billed
  • Region is not hardcoded — uses {region} placeholder
  • project_id is auto-resolved when omitted
  • No hardcoded AK/SK in any file — credentials configured via hcloud configure set by the user outside the agent session
  • Agent must use hcloud configure list for credential presence check only — NEVER read/echo AK/SK values
  • If no valid credentials found, agent must STOP and guide user through the 3-step configuration process (see Prerequisites section)
  • SDK fallback available when CLI encounters bugs
  • Complex nested parameters use --cli-jsonInput with JSON file

附带文件

技能加载后,模型会按需读取这些文件。它们仅作为可读文件提供,绝不会被执行。

常见问题

Huawei Cloud Modelarts Training Management AI 技能有什么作用?

Manage Huawei Cloud ModelArts training jobs and related resources through full lifecycle operations via hcloud CLI. Covers 52 API interfaces across 8 functional domains: training job management, algorithm management, training job tags, training experiments, training job events, model import, auto search (hyperparameter tuning), and training image save. All write operations require user confirmation before execution. Triggers include: "ModelArts training", "训练作业", "模型训练", "创建训练作业", "查询训练作业", "停止训练作业", "删除训练作业", "算法管理", "超参配置", "training job", "training management", "create training", "ModelA...

为什么在 TypingMind 中使用 Huawei Cloud Modelarts Training Management?

因为您只需安装一次,就能搭配任何模型使用。Huawei Cloud Modelarts Training Management 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Huawei Cloud Modelarts Training Management?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/huaweicloud/huaweicloud-skills/tree/master/skills/ai/modelarts/huawei-cloud-modelarts-training-management。TypingMind 会读取其中的 SKILL.md,打包相关文件,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Huawei Cloud Modelarts Training Management?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Huawei Cloud Modelarts Training Management 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Huawei Cloud Modelarts Training Management 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Huawei Cloud Modelarts Training Management AI 技能免费吗?

是的。huaweicloud 已在 GitHub 上根据 MIT 许可证发布了该技能。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇