trinity.perf package#
Submodules#
- trinity.perf.report_metrics module
- trinity.perf.report_viewer module
PerfReportViewerlaunch_report_viewer()has_streamlit_context()configure_streamlit_page()parse_args()load_report()infer_module_name()get_step_metric_prefixes()format_timestamp()format_metric_value()metric_label()gpu_series_label()render_metric_card()build_elapsed_series()build_scalar_timeline_series()build_gpu_timeline_series()render_line_chart()render_step_metric_chart()render_header()compute_global_token_throughput_metrics()render_global_metrics()render_step_metrics()render_resource_utilization()main()
- trinity.perf.resource_backends module
- trinity.perf.resource_sampler module
- trinity.perf.stage_perf module
- trinity.perf.tensorboard_metrics module
Module contents#
Performance tooling package for Trinity.
- class trinity.perf.ExplorerPerfOptions(config_path: 'str', output_path: 'str', monitor_interval: 'float' = 2.0, total_steps: 'int' = 5, timeout: 'Optional[float]' = None)[source]#
Bases:
object- config_path: str#
- output_path: str#
- monitor_interval: float#
- total_steps: int#
- timeout: float | None#
- __init__(config_path: str, output_path: str, monitor_interval: float = 2.0, total_steps: int = 5, timeout: float | None = None) None#
- class trinity.perf.ResourceSampler(interval_seconds: float, backend: SystemResourceBackend | None = None)[source]#
Bases:
objectPeriodically collect system resource samples in a background thread.
- __init__(interval_seconds: float, backend: SystemResourceBackend | None = None) None[source]#
- samples() list[ResourceSample][source]#
Return a snapshot of all collected samples.
- stop() list[ResourceSample][source]#
Stop sampling and return the collected samples.
- class trinity.perf.TensorBoardScalarReader(log_dir: str)[source]#
Bases:
objectRead scalar metrics from TensorBoard event files.
- trinity.perf.collect_step_metrics(metric_map: dict[str, dict[int, float]]) list[dict[str, Any]][source]#
Build per-step metrics from TensorBoard scalars.
- trinity.perf.run_explorer_perf(options: ExplorerPerfOptions) dict[str, Any][source]#
Run Explorer perf collection and return the result payload.