Aggregated metrics manager
fyt.core.aggregated_metrics_manager
¶
AggregatedMetricsManager
¶
Handles aggregation and logging of metrics across multiple seed runs.
This class provides functionality to: - Aggregate metrics from multiple runs - Generate distribution plots with KDE for each metric - Calculate comprehensive statistics (mean, median, std, IQR, min, max, quartiles) - Log results via the experiment logger abstraction
Instances expose input_data (the validated input containing metrics
results and experiment name), experiment_name (the name of the
experiment), and seeds (the list of seeds extracted from the metrics
results), all set during initialization.
__init__(input_data, experiment_logger=None)
¶
Initialize the aggregated metrics manager.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input_data
|
AggregatedMetricsManagerInput
|
Validated AggregatedMetricsManagerInput containing metrics and experiment info |
required |
experiment_logger
|
BaseExperimentLogger | None
|
Experiment logger for logging results. |
None
|
generate_aggregated_statistics()
¶
Generate aggregated statistics for all metrics.
Returns:
| Type | Description |
|---|---|
list[AggregatedMetricResult]
|
List of AggregatedMetricResult objects |
generate_all_plots()
¶
Generate distribution plots for all metrics.
Returns:
| Type | Description |
|---|---|
dict[str, Figure]
|
Dictionary mapping metric names to Plotly Figure objects |
log_results()
¶
Log aggregated metrics, statistics, and plots via the experiment logger.
Creates a new run under the same experiment and logs: - Aggregated statistics as a dataset (CSV artifact) - Distribution plots for each metric as HTML artifacts - Summary metrics
Returns:
| Type | Description |
|---|---|
str
|
The run_id of the created run. |