AGENT SKILL

repo-development

Maintain segmentation_models_pytorch source, docs, and focused tests safely inside an SMP checkout.

License 许可
MIT
最近更新
2026-09-03
Stars
★ 351
Forks
27

01 前言 Front Matter

name
repo-development
license
MIT
metadata
{ "disco-role": "operating" }
description
Maintain segmentation_models_pytorch source, docs, and focused tests safely inside an SMP checkout.
disable-model-invocation
true

02 资源文件 4

03 SKILL.md 正文

Repo Development

Use this sub-skill when the task is to edit this repository rather than simply use the installed package: add or change a decoder/model architecture, encoder, loss, metric, docs table, tests, pytest marker selection, Makefile workflow, or contributor-facing docs.

Do not use this sub-skill for ordinary training/inference examples, release publishing, private Hugging Face credentials, or broad benchmark/model generation. For usage-level questions, route to the appropriate sibling runtime sub-skill instead of changing repository files.

Start Here

  1. Identify the changed surface from the request and touched paths: decoder/model, encoder, loss/metric, base module, docs, or tests.
  2. Read references/maintainer-guide.md for source ownership, metadata, Make targets, docs table generation, and safe maintainer boundaries.
  3. Use references/test-selection.md to choose the smallest useful pytest, ruff, and docs commands before considering broad make test or marker-heavy runs.
  4. Run python sub-skills/repo-development/scripts/list_changed_test_focus.py <changed-path>... from the generated skill root, or copy the script path from this sub-skill, to get JSON command suggestions from explicit changed files.
  5. If a command fails or looks unexpectedly slow/networked, check references/troubleshooting.md before widening scope.

Editing Checklist

  • Keep package code under segmentation_models_pytorch/ and tests under tests/; update docs in docs/*.rst and generated tables only when the changed surface requires it.
  • Preserve public API exports in segmentation_models_pytorch/__init__.py, decoder package __init__.py files, segmentation_models_pytorch/encoders/__init__.py, losses/__init__.py, and metrics/__init__.py when adding new public objects.
  • Prefer focused tests first: one decoder test file for a decoder change, one encoder test file for an encoder change, tests/test_losses.py for losses, tests/test_preprocessing.py for preprocessing metadata, and base tests for shared modules.
  • Treat logits_match, compile, torch_export, and torch_script as opt-in markers; they can be slow, version-gated, or network/cache-sensitive.
  • Use make fixup or ruff check --fix plus ruff format for repository style; the configured Ruff settings live in pyproject.toml.
  • Do not run or recommend misc/generate_test_models.py unless the user explicitly asks for maintainer-only Hugging Face model fixture regeneration.

04 同仓库更多 Skills

VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-triton-opt

Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-solve

END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-skill

PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-pattern-fusion

Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-orchestrate

Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-feedback

Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).

★ 351