技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
mmpretrain【数据与研究】Operate MMPreTrain model-zoo inference, config-driven training and evaluation, dataset/customization, analysis utilities, checkpoint conversion, and serving workflows.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this skill when a task involves MMPreTrain / OpenMMLab Model Pretraining Toolbox as a package or framework: model-zoo discovery, inference, feature extraction, config-driven training/testing, dataset preparation, registry customization, analysis tools, checkpoint conversion, or serving packaging.
references/package-overview.md for the package surfaces and optional capability map.references/installation-and-troubleshooting.md when installation, import, ModelHub, optional dependencies, or backend readiness are uncertain.scripts/check_mmpretrain_env.py for a no-download package smoke check before relying on model-zoo APIs or backend-specific behavior.references/repo-provenance.md before deciding whether this skill is stale for a different checkout or package version.| User task | Read |
|---|---|
List available models, choose a checkpoint policy, use get_model, run image classification, retrieval, captioning, VQA, visual grounding, NLVR, or extract features | sub-skills/model-zoo-inference/SKILL.md |
Inspect or modify configs, plan mim train mmpretrain / mim test mmpretrain, choose CPU/GPU/distributed/Slurm launch, use resume/AMP/auto-scale-lr/TTA/output dumps, or plan K-fold | sub-skills/training-and-evaluation/SKILL.md |
Prepare CustomDataset, ImageNet, or OpenMMLab 2.0 annotations; inspect dataloader fields; build transform pipelines; register custom datasets/models/metrics/hooks/optimizers | sub-skills/datasets-and-customization/SKILL.md |
| Analyze JSON logs/results, compute metrics/confusion matrices/FLOPs, visualize CAM/t-SNE/schedulers/datasets, publish/convert checkpoints, reparameterize, or package TorchServe artifacts | sub-skills/tools-analysis-and-deployment/SKILL.md |
Typical package install:
pip install -U openmim
mim install "mmpretrain>=1.0.0rc8"
Development/package-tool install:
pip install -U openmim
mim install -e .
Multi-modal workflows need the optional dependency group:
mim install "mmpretrain[multimodal]>=1.0.0rc8"
MMPreTrain expects Python 3.7+, PyTorch 1.8+, mmcv>=2.0.0,<2.4.0, and mmengine>=0.8.3,<1.0.0. Select a CUDA-capable PyTorch/MMCV build only when the task requires GPU or distributed behavior.
get_model(..., pretrained=False) or inferencer pretrained=False; inferencer classes otherwise try default weights.--gpus 0 and/or CUDA_VISIBLE_DEVICES=-1.training-and-evaluation and dataset schema work to datasets-and-customization.File ... .mim/model-index.yml does not exist, incompatible mmcv / mmengine, NumPy ABI warnings, or CUDA backend mismatch: references/installation-and-troubleshooting.md.sub-skills/model-zoo-inference/references/troubleshooting.md._base_ inheritance, --cfg-options quoting, load_from versus resume, AMP/TTA, or distributed launch hangs: sub-skills/training-and-evaluation/references/troubleshooting.md.LoadImageFromFile, unreadable images, or registry KeyError: sub-skills/datasets-and-customization/references/troubleshooting.md.sub-skills/tools-analysis-and-deployment/references/troubleshooting.md.