nvflare.app_common.widgets.metrics_artifact_writer module
- class MetricsArtifactWriter(results_dir: str = 'metrics', summary_file_name: str = 'metrics_summary.json', round_file_name: str = 'round_metrics.jsonl', limits: Dict[str, int] | None = None)[source]
Bases:
WidgetWrites safe, machine-readable round and summary metric artifacts.
The writer consumes metrics already produced by workflows/controllers. It records dynamic metric names as values instead of object keys so downstream consumers do not need to treat client-provided names as JSON object structure.
Init the Widget.