runtime-utilities-and-visualization
Use MMEngine logging, message hubs, visualizer backends, distributed and device utilities, environment checks, timers, progress bars, manager mixins, and testing helpers safely.
- License 许可
- Apache-2.0
- 最近更新
- 2026-10-08
- Stars
- ★ 11
- Forks
- 3
01 前言 Front Matter
- name
- runtime-utilities-and-visualization
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Use MMEngine logging, message hubs, visualizer backends, distributed and device utilities, environment checks, timers, progress bars, manager mixins, and testing helpers safely.
- disable-model-invocation
- true
02 资源文件 3
- 参考文档references/distributed-device-utilities.md6.8 KB
- 参考文档references/logging-visualization-workflows.md6.5 KB
- 参考文档references/troubleshooting.md7.3 KB
03 SKILL.md 正文
Runtime Utilities and Visualization
Use this sub-skill when a task mentions MMLogger, print_log, MessageHub, Visualizer, LocalVisBackend, TensorboardVisBackend, WandbVisBackend, MLflow/ClearML/Aim/DVCLive/Neptune backends, init_dist, get_dist_info, collect_results, master_only, get_device, collect_env, ManagerMixin, progress bars, Timer, or MMEngine testing helpers.
Read Order
- references/logging-visualization-workflows.md: Choose and use loggers, message hubs, visualizers, local outputs, and optional tracking-service backends.
- references/distributed-device-utilities.md: Use distributed rank helpers, safe result collection, device detection, environment reports, timers, progress helpers, manager mixins, and testing utilities.
- references/troubleshooting.md: Diagnose duplicate loggers, optional backend dependency failures, visualization output surprises, distributed no-op behavior, collection mismatches, device fallback, and test-helper pitfalls.
- scripts/runtime_env_check.py: Run a safe local import/environment diagnostic, construct a temporary
LocalVisBackendvisualizer, and report distributed availability without launching multi-process jobs.
Scope
This sub-skill owns MMEngine runtime utilities: mmengine.logging, mmengine.visualization, mmengine.dist, mmengine.device, mmengine.utils, mmengine.utils.dl_utils.collect_env, mmengine.testing, ManagerMixin-based singleton behavior, progress helpers, and timers.
Route adjacent issues to sibling skills:
- Use
../runner-and-training/SKILL.mdfor RunnerLoggerHook,NaiveVisualizationHook, launch command placement, training log intervals, checkpoint/resume, and hook ordering. - Use
../models-metrics-and-inference/SKILL.mdfor model complexity/analysis APIs,BaseModel,BaseMetric, evaluator contracts, and inference/TTA behavior. - Use
../data-structures-and-io/SKILL.mdfor file format IO, file backends, datasets, samplers, collation, and data element schemas. - Use
../configuration-and-registry/SKILL.mdfor config syntax, registries,DefaultScope, and config-driven object construction.
Fast Workflow
- For one-off logging, call
print_log; for reusable project logging, create a namedMMLogger.get_instance(...)and reuse that instance name. - For training/runtime state shared across components, store numeric histories with
MessageHub.update_scalar(s)and overwrite current metadata withMessageHub.update_info. - For visualization without credentials, prefer
Visualizer(..., vis_backends=[dict(type='LocalVisBackend')], save_dir=...); add TensorBoard or service backends only when dependencies and credentials are available. - For distributed-safe code, call
get_dist_info()first; expect(0, 1)outside distributed launch and remembermaster_onlysilently returnsNoneon non-main ranks. - Before debugging user environments, run
python scripts/runtime_env_check.py --helpfrom this sub-skill directory, then run it with an optional--work-dirthat points to a disposable output directory.
Safe Operating Rules
- Do not initialize distributed jobs from helper scripts unless the user has explicitly launched the process group with PyTorch, MPI, or Slurm environment variables.
- Do not require optional tracking services, credentials, network access, or original MMEngine repository files; use
LocalVisBackendas the safe fallback. - Treat visualizer
save_diras a user project output path and keep generated runtime skill files independent from any user experiment outputs.
04 同仓库更多 Skills
obsidian-clipper-template-creator
Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.
obsidian-clipper-template-creator
Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.
python-api
Programmatic Object-Detection-Metrics API guidance for BoundingBox, BoundingBoxes, Evaluator, enums, coordinate conversion, AP/mAP semantics, and source-style import diagnostics.
file-evaluation
Folder-based PASCAL VOC AP/mAP evaluation from ground-truth and detection text files.
object-detection-metrics
Guides legacy Object-Detection-Metrics PASCAL VOC AP/mAP evaluation from detection text folders and direct Python API classes.
nx-workspace-patterns
Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.