checkpoints-and-diagnostics
Inspects and troubleshoots MuZero General checkpoints, replay buffers, TensorBoard artifacts, and model-dynamics diagnostics.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- checkpoints-and-diagnostics
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Inspects and troubleshoots MuZero General checkpoints, replay buffers, TensorBoard artifacts, and model-dynamics diagnostics.
- disable-model-invocation
- true
02 资源文件 3
- 参考文档references/checkpoints-and-diagnostics.md4.4 KB
- 参考文档references/troubleshooting.md3.3 KB
- 脚本scripts/inspect_checkpoint.py6.1 KB
03 SKILL.md 正文
Checkpoints and Diagnostics
Use this sub-skill when the task is to load or inspect model.checkpoint, reason about replay_buffer.pkl, avoid checkpoint/config mismatches, understand results/<game>/<timestamp>/, run non-interactive diagnostics, or troubleshoot Graphviz/matplotlib/TensorBoard artifacts.
Fast route
-
Read checkpoints-and-diagnostics.md for checkpoint schema, save/load paths, replay buffer fields,
DiagnoseModelmethods, TensorBoard artifacts, and safe headless workflows. -
Read troubleshooting.md when paths are invalid,
torch.loadfails, weights do not match the selected config/network, replay buffer loading fails, Graphviz is missing, or plotting blocks a headless session. -
Inspect a checkpoint without running a model:
python sub-skills/checkpoints-and-diagnostics/scripts/inspect_checkpoint.py --checkpoint <model.checkpoint> --json -
Before calling
MuZero.load_model(...), confirm the intended game/config in games-and-configs and model shape compatibility in models-and-mcts.
Scope and routing boundaries
This sub-skill owns:
MuZero.load_model(checkpoint_path=None, replay_buffer_path=None)behavior.SharedStorage.save_checkpoint(path=None)and defaultmodel.checkpointpaths.- Checkpoint dict keys, counters, weight state dicts, optimizer state, and replay buffer pickle metadata.
DiagnoseModelandTrajectoryinfousage boundaries.- Optional Graphviz and plotting dependencies.
- Safe non-interactive checkpoint inspection and headless diagnostic planning.
Route elsewhere when the task is primarily about:
- Producing checkpoints through training, TensorBoard logging loop, or CLI commands: training-and-cli.
- Choosing game/config fields for checkpoint compatibility: games-and-configs.
- Interpreting network tensor shape, support size, or MCTS internals: models-and-mcts.
Safe defaults
- Use
torch.load(..., map_location="cpu")for inspection unless the user explicitly wants GPU loading. - Do not bundle or depend on source
results/binary checkpoints; they are evidence of schema and naming only. - Do not call
MuZero.diagnose_modelin automation; it calls plotting paths and then waits for input. - Prefer
DiagnoseModel(...).compare_virtual_with_real_trajectories(..., plot=False)only after a matching config/game/checkpoint is loaded and a real observation is available.
Compatibility checklist
Before loading a checkpoint for testing or diagnostics:
- Game module matches the checkpoint's architecture assumptions.
network,support_size,observation_shape,action_space,stacked_observations,channels/encoding_size, and downsample fields match the saved weights.- Replay buffer, if loaded, was produced by the same or compatible game/config.
- Paths point to files, not directories.
- Optional plotting dependencies are installed only when plots are needed.
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).