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
In this repository15 other files it gives its agents.
- agents/AGENTS.mdAGENTS.md
- modelscope-cliSkill
- modelscope-dataset-explorerSkill
- modelscope-datasetsSkill
- modelscope-evaluationSkill
- gradioSkill
- modelscope-jobsSkill
- modelscope-local-trainerSkill
- modelscope-local-vision-trainerSkill
- modelscope-mcpSkill
- modelscope-model-trainerSkill
- modelscope-paper-publisherSkill
- modelscope-tool-builderSkill
- modelscope-trackingSkill
- transformers-jsSkill
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
- Distinctive: line 8
Use this skill for image classification, object detection, and segmentation training when the user explains the goal in natural language.
- Distinctive: line 17
Default behavior: inspect first, write configs next, submit remotely only when a runnable training entrypoint exists
- Very specific: line 21
Run scripts/prepare_training_workspace.py with the user's request text.
- Distinctive: line 31
Before the first real PAI DLC submission, require:
- Distinctive: line 38
If any are missing:
- Very specific: line 61
If configs/pai.required.env exists, stop and wait for user input.
- Distinctive: line 62
If the workspace already contains a real training entrypoint, package it and submit to PAI DLC.
- Distinctive: line 63
If it does not, scaffold or request the entrypoint explicitly.
- Very specific: line 70
When task is ambiguous, default to classification
- Very specific: line 75
Use REMOTE_ASSET_PATHS when local scripts, configs, or data must be shipped to PAI DLC.
- Distinctive: line 77
Keep the remote job honest: if a real training script is missing, the result is a remote-ready package, not a completed training run.
- Distinctive: line 91
Never skip dataset sanity checks.
- Distinctive: line 92
Never assume annotations are valid without inspection.
- Distinctive: line 93
Never claim built-in end-to-end support for a task unless the runnable code exists.
- Distinctive: line 94
Never bypass the PAI credential gate.
≈ “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.
Files
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:
configs/vision.training.jsonconfigs/remote.auto.envconfigs/pai.required.envwhen 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_IDALIBABA_CLOUD_ACCESS_KEY_SECRETPAI_REGIONPAI_WORKSPACE_ID
If any are missing:
- Create
configs/pai.required.env. - Tell the user to fill it.
- Wait for
continue.
Primary Scripts
scripts/prepare_training_workspace.pyscripts/dataset_inspector.pyscripts/image_classification_training.pyscripts/object_detection_training.pyscripts/sam_segmentation_training.pyscripts/estimate_cost.pyscripts/submit_pai_dlc.py
The three task scripts output structured plans. They are not fake training commands anymore.
Workflow
- Infer the task from the request or dataset layout.
- Run
scripts/prepare_training_workspace.py --request "<user text>". - Inspect local data with
scripts/dataset_inspector.pywhen paths exist. - If
configs/pai.required.envexists, stop and wait for user input. - If the workspace already contains a real training entrypoint, package it and submit to PAI DLC.
- 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_PATHSwhen 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_PATHSautomatically 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.mdreferences/timm_trainer.mdreferences/object_detection_training_notebook.mdreferences/image_classification_training_notebook.mdreferences/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.
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
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.

