logging-core
Ordinary TensorBoard scalar logging, writer lifecycle, and event-file checks for tensorboardX.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- logging-core
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Ordinary TensorBoard scalar logging, writer lifecycle, and event-file checks for tensorboardX.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/api-reference.md3.4 KB
- 参考文档references/troubleshooting.md2.1 KB
- 参考文档references/workflows.md2.0 KB
- 脚本scripts/tbx_hparams_smoke.py2.6 KB
- 脚本scripts/tbx_logging_smoke.py3.2 KB
03 SKILL.md 正文
logging-core
Use this sub-skill for the ordinary tensorboardX event-writing path: creating a writer, logging scalar-like values, managing run directories, and checking that TensorBoard can read the result.
Use this when
- the user needs
SummaryWritersetup or logdir naming guidance - the task is about
add_scalar,add_scalars, hparams, or custom scalar layouts - the user asks why TensorBoard does not show a run yet
- the code must flush, close, reopen, or resume a writer safely
- the user wants
write_to_disk=Falsefor dry runs or tests - a small local event-file smoke check is enough to validate the workflow
Route out
- Rich media summaries such as images, audio, video, PR curves, mesh, and deeper text handling: ../rich-media-summaries/SKILL.md
- Graph, embedding, ONNX, and OpenVINO logging: ../graph-and-embedding-plugins/SKILL.md
- Multiprocessing, global writer, S3/GCS, and Comet integrations: ../remote-and-parallel-integrations/SKILL.md
- Shared install issues before a workflow is selected: ../../references/install-and-routing.md
Operating sequence
- Choose a writable logdir or let
SummaryWriter()create one. - Use slash-separated tags for related scalar plots.
- Log scalar-like data with explicit steps whenever reproducibility matters.
- Use
with writer.use_metadata(global_step=step): ...when several calls share one step or wall time. - Call
flush()when immediate visibility matters andclose()when the run is done. - Inspect output with
tensorboard --logdir <logdir>after event files exist. - If the run resumed after a crash, use
purge_stepinstead of mixing stale and new steps blindly.
Bundled helpers
- scripts/tbx_logging_smoke.py: writes a tiny scalar, scalar-group, custom-scalar, text, and optional JSON-export run, then reports event-file counts.
- scripts/tbx_hparams_smoke.py: writes a tiny hparams comparison with distinct trial names.
Run each helper with --help first. Both are safe by default and create temporary output when no logdir is supplied.
References
- references/api-reference.md: verified method signatures, writer stack, logdir behavior, scalar groups, hparams, and lifecycle details.
- references/workflows.md: short recipes for scalar runs, hparams, metadata defaults, custom scalars, crash recovery, and local event-file sanity checks.
- references/troubleshooting.md: missing event files, delayed flushes, duplicate steps, scalar shape errors, JSON-export surprises, path issues, and memory growth.
Decision hints
- Use
add_scalar()for one numeric series andadd_scalars()for grouped charts. - Use
add_hparams()for comparing explicit trial configurations, not as a full hyperparameter search engine. - Use
write_to_disk=Falseonly when the absence of event files is intended. - Prefer context managers in short scripts so event files are closed even on exceptions.
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).