agentleFS
hyf020908hyf020908/modelscope-skills/skills/modelscope-vision-trainer/SKILL.md

modelscope-vision-trainer

Skill4 starsChanged 8 months agoApache-2.0View on GitHub

Turn plain-language vision fine-tuning requests into task plans, config files, and PAI-ready submission assets.

  • Reads credentials

The file

Show its rules and text

We split this skill into the rules it gives an agent

15 rules. About 0 are common, 11 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈11

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill for image classification, object detection, and segmentation training when the user explains the goal in natural language.

    line 8
  2. Distinctive:

    Default behavior: inspect first, write configs next, submit remotely only when a runnable training entrypoint exists

    line 17
  3. Very specific:

    Run scripts/prepare_training_workspace.py with the user's request text.

    line 21
  4. Distinctive:

    Before the first real PAI DLC submission, require:

    line 31
  5. Distinctive:

    If any are missing:

    line 38
  6. Very specific:

    If configs/pai.required.env exists, stop and wait for user input.

    line 61
  7. Distinctive:

    If the workspace already contains a real training entrypoint, package it and submit to PAI DLC.

    line 62
  8. Distinctive:

    If it does not, scaffold or request the entrypoint explicitly.

    line 63
  9. Very specific:

    When task is ambiguous, default to classification

    line 70
  10. Very specific:

    Use REMOTE_ASSET_PATHS when local scripts, configs, or data must be shipped to PAI DLC.

    line 75
  11. Distinctive:

    Keep the remote job honest: if a real training script is missing, the result is a remote-ready package, not a completed training run.

    line 77
  12. Distinctive:

    Never skip dataset sanity checks.

    line 91
  13. Distinctive:

    Never assume annotations are valid without inspection.

    line 92
  14. Distinctive:

    Never claim built-in end-to-end support for a task unless the runnable code exists.

    line 93
  15. Distinctive:

    Never bypass the PAI credential gate.

    line 94

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

ModelScope Vision Trainer

Use this skill for image classification, object detection, and segmentation training when the user explains the goal in natural language.

Request Style

  • Accept requests such as:
    • Fine-tune a classifier on ./data/vision/train and ./data/vision/val.
    • 我想做目标检测,标注在 ./data/annotations/train.json 和 ./data/annotations/val.json。
  • Infer missing fields where that is safe.
  • Default task: classification
  • Default behavior: inspect first, write configs next, submit remotely only when a runnable training entrypoint exists

Files You Must Create

Run scripts/prepare_training_workspace.py with the user's request text. It writes:

  1. configs/vision.training.json
  2. configs/remote.auto.env
  3. configs/pai.required.env when the required PAI fields are missing

These files are the source of truth for the rest of the workflow.

Credential Gate

Before the first real PAI DLC submission, require:

  • ALIBABA_CLOUD_ACCESS_KEY_ID
  • ALIBABA_CLOUD_ACCESS_KEY_SECRET
  • PAI_REGION
  • PAI_WORKSPACE_ID

If any are missing:

  1. Create configs/pai.required.env.
  2. Tell the user to fill it.
  3. Wait for continue.

Primary Scripts

  • scripts/prepare_training_workspace.py
  • scripts/dataset_inspector.py
  • scripts/image_classification_training.py
  • scripts/object_detection_training.py
  • scripts/sam_segmentation_training.py
  • scripts/estimate_cost.py
  • scripts/submit_pai_dlc.py

The three task scripts output structured plans. They are not fake training commands anymore.

Workflow

  1. Infer the task from the request or dataset layout.
  2. Run scripts/prepare_training_workspace.py --request "<user text>".
  3. Inspect local data with scripts/dataset_inspector.py when paths exist.
  4. If configs/pai.required.env exists, stop and wait for user input.
  5. If the workspace already contains a real training entrypoint, package it and submit to PAI DLC.
  6. If it does not, scaffold or request the entrypoint explicitly. Do not pretend the run is executable.

Task Selection

  • Classification keywords: classification, 分类
  • Detection keywords: detection, 目标检测
  • Segmentation keywords: segmentation, segment, 分割, sam
  • When task is ambiguous, default to classification

Remote Submission Rules

  • The local machine is the control plane only.
  • Use REMOTE_ASSET_PATHS when local scripts, configs, or data must be shipped to PAI DLC.
  • Local dataset directories, annotation files, and image roots should be appended to REMOTE_ASSET_PATHS automatically when the planner can resolve them.
  • Keep the remote job honest: if a real training script is missing, the result is a remote-ready package, not a completed training run.

References

  • references/reliability_principles.md
  • references/timm_trainer.md
  • references/object_detection_training_notebook.md
  • references/image_classification_training_notebook.md
  • references/finetune_sam2_trainer.md

Load only the task-specific reference you need.

Guardrails

  • Never skip dataset sanity checks.
  • Never assume annotations are valid without inspection.
  • Never claim built-in end-to-end support for a task unless the runnable code exists.
  • Never bypass the PAI credential gate.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.