bundle-config
Work with MONAI Bundle configuration syntax, metadata/spec files, ConfigParser, ConfigWorkflow, Bundle CLI commands, verification, export, and package-style bundle workflows.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- bundle-config
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Work with MONAI Bundle configuration syntax, metadata/spec files, ConfigParser, ConfigWorkflow, Bundle CLI commands, verification, export, and package-style bundle workflows.
- disable-model-invocation
- true
02 资源文件 8
- 参考文档references/cli-reference.md10.0 KB
- 参考文档references/config-syntax.md8.8 KB
- 参考文档references/troubleshooting.md9.0 KB
- 脚本scripts/monai_bundle_smoke.py6.8 KB
- 参考文档templates/tiny-bundle/configs/inference.json259 B
- 参考文档templates/tiny-bundle/configs/metadata.json1.2 KB
- 参考文档templates/tiny-bundle/docs/README.md339 B
- 许可证templates/tiny-bundle/LICENSE34 B
03 SKILL.md 正文
MONAI Bundle Config
Use this sub-skill when the task involves monai.bundle, python -m monai.bundle, Bundle JSON/YAML config syntax, metadata/spec files, ConfigParser, BundleWorkflow, ConfigWorkflow, CLI overrides, verification, export, or reproducible package-style bundle workflows.
Do not use this sub-skill for Auto3DSeg orchestration that generates bundles; route those tasks to apps-auto3dseg. For Bundle component internals, route model definitions to the model sub-skill, transforms and datasets to the data/transforms sub-skills, and training loop objects to the training sub-skill.
Fast Routing
- Read
references/config-syntax.mdwhen authoring, merging, overriding, or debugging Bundle JSON/YAML with_target_,@,%,$, nested ids, andConfigParser. - Read
references/cli-reference.mdwhen invokingpython -m monai.bundle, selecting commands, preparing CLI overrides, validating metadata/network I/O, exporting checkpoints, downloading large files, or pushing bundles. - Read
references/troubleshooting.mdwhen Bundle parsing, CLI startup, verification, export, path, optional dependency, or network/download behavior fails. - Run
scripts/monai_bundle_smoke.py --helpwhen checking what the bundled smoke script can do without touching external data or repository source files. - Run
scripts/monai_bundle_smoke.py parse-inlinewhen confirming the installed MONAI Bundle parser can instantiate a tiny object graph and apply an override. - Run
scripts/monai_bundle_smoke.py build-tiny-bundle --output <dir>when a temporary self-contained Bundle directory is useful for experimentation. - Use
templates/tiny-bundle/as a copyable minimal Bundle skeleton when a user asks for example bundle files rather than a generated temporary directory.
Common Workflows
- For config authoring, start with
references/config-syntax.md, keep top-level ids meaningful, use_target_for instantiable Python objects, and prefer simple@references over complex$expressions. - For Bundle CLI work, ensure Python Fire is installed, run command help as
python -m monai.bundle <command> -- --help, and quote shell-sensitive ids such asnetwork_def#spatial_dims. - For verification, use
verify_metadatafor schema-backed metadata andverify_net_in_outonly when the config network can run safely on the requested device with fake tensor input. - For export, require an existing checkpoint, config file, and compatible optional export dependencies before using
ckpt_export,onnx_export, ortrt_export. - For reproducible workflows, prefer
run_workflow/create_workflowwith explicitconfig_file,meta_file,workflow_type, and overrides instead of relying on current working directory defaults.
Safety Defaults
- Treat download, Hub push, and large-file commands as network/credential operations; ask before running them unless the user explicitly requested network publishing or downloads.
- Do not claim optional IO/export/tracking/HPO dependencies are installed unless the current environment proves it.
- Avoid absolute local paths in reusable instructions; use placeholders such as
<bundle_dir>,<config_file>, and<checkpoint.pt>. - Keep generated Bundle examples small, CPU-safe, and based on installed
monai,torch, andnumpyAPIs.
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).