AGENT SKILL

model-lifecycle

Guides RoboSat model training, checkpoint resume, ONNX export, batch prediction, on-demand serving, U-Net APIs, configs, and CPU/CUDA troubleshooting.

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

01 前言 Front Matter

name
model-lifecycle
license
MIT
metadata
{ "disco-role": "operating" }
description
Guides RoboSat model training, checkpoint resume, ONNX export, batch prediction, on-demand serving, U-Net APIs, configs, and CPU/CUDA troubleshooting.
disable-model-invocation
true

02 资源文件 6

03 SKILL.md 正文

Model lifecycle

Use this sub-skill for RoboSat work that sits on the model side of the pipeline.

Use this route when the user needs to

  • train a segmentation model on an existing slippy-map dataset
  • resume or fine-tune from a .pth checkpoint
  • export a trained checkpoint to an ONNX .pb
  • run batch prediction and write probability tiles
  • serve on-demand mask tiles through the Flask tile server
  • inspect or reason about UNet, losses, metrics, transforms, or dataset wrappers
  • debug CPU/CUDA, checkpoint, or config problems

Do not use this route for

  • imagery download, OSM extraction, rasterization, class-weight generation, or tile-layout work
  • probability-to-mask conversion, GeoJSON feature extraction, merge/dedupe/compare workflows
  • Docker publishing or maintainer release workflows

Read first

Bundled checks

Short route map

Train or resume

  1. Check the dataset layout and class-weight assumptions in configuration.md.
  2. Run scripts/check_training_layout.py against the dataset root before launching training.
  3. Use rs train or python -m robosat.tools train with a writable checkpoint directory.
  4. Inspect the generated .pth, log, and history-*.png files.

Export

  1. Start from a trained checkpoint with the matching class count.
  2. Use rs export or python -m robosat.tools export to write the ONNX .pb.
  3. Verify the file exists and can be consumed by downstream ONNX tooling.

Predict

  1. Reuse the matching model and dataset config plus a trained checkpoint.
  2. Use rs predict or python -m robosat.tools predict on a slippy-map tile tree.
  3. Check the probability tile directory for z/x/y.png outputs.

Serve

  1. Reuse the same checkpoint, model config, and dataset config.
  2. Set the map access token and a tile URL template with {x}, {y}, and {z} placeholders.
  3. Use rs serve or python -m robosat.tools serve for quick on-demand mask inspection.

Cross-route guidance

  • If the task is about creating the dataset itself, use the data-preparation route instead.
  • If the task is about turning probability masks into GeoJSON or comparing/merging masks, use the feature-postprocessing route instead.
  • If a workflow hits a missing dependency or backend issue, read references/troubleshooting.md before changing the command.

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