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
- 参考文档references/api-reference.md6.1 KB
- 参考文档references/configuration.md3.5 KB
- 参考文档references/troubleshooting.md4.7 KB
- 参考文档references/workflows.md6.4 KB
- 脚本scripts/check_training_layout.py5.4 KB
- 脚本scripts/unet_cpu_smoke.py2.0 KB
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
.pthcheckpoint - 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
- references/workflows.md for command templates and validation steps.
- references/configuration.md for model/dataset TOML fields and checkpoint format.
- references/api-reference.md for model classes, losses, metrics, transforms, and buffered tile helpers.
- references/troubleshooting.md for the common failure modes and recovery paths.
Bundled checks
- scripts/unet_cpu_smoke.py proves the installed package can build
UNet(pretrained=False)and run a tiny CPU forward pass. - scripts/check_training_layout.py validates the
training/andvalidation/splits, matching tile ids, and optional batch/drop-last risk.
Short route map
Train or resume
- Check the dataset layout and class-weight assumptions in
configuration.md. - Run
scripts/check_training_layout.pyagainst the dataset root before launching training. - Use
rs trainorpython -m robosat.tools trainwith a writable checkpoint directory. - Inspect the generated
.pth,log, andhistory-*.pngfiles.
Export
- Start from a trained checkpoint with the matching class count.
- Use
rs exportorpython -m robosat.tools exportto write the ONNX.pb. - Verify the file exists and can be consumed by downstream ONNX tooling.
Predict
- Reuse the matching model and dataset config plus a trained checkpoint.
- Use
rs predictorpython -m robosat.tools predicton a slippy-map tile tree. - Check the probability tile directory for
z/x/y.pngoutputs.
Serve
- Reuse the same checkpoint, model config, and dataset config.
- Set the map access token and a tile URL template with
{x},{y}, and{z}placeholders. - Use
rs serveorpython -m robosat.tools servefor 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.mdbefore changing the command.
04 同仓库更多 Skills
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.
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.
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.
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.
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.
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).