qat.core.metrics_base module
- class MetricsManager(enabled_metrics=<MetricsType.Default: 6>, **kwargs)
Bases:
BaseModel
Stores useful intermediary metrics that are generated during compilation, such as an optimised circuit or the instruction count.
Pydantic version based on
qat.purr.compiler.metrics
elements.- Parameters:
enabled_metrics¶ (
MetricsType
) – Which metrics to enable? Default,MetricsType.Default.
- are_enabled(metric)
- as_dict()
Generates a dictionary of the valid metrics.
- enable(enabled_metrics, overwrite=False)
Enable these sets of metrics for collection.
- enable_metrics(enabled_metrics=<MetricsType.Default: 6>, overwrite=True)
Enables the set of metrics in the current collection.
-
enabled_metrics:
Optional
[MetricsType
]
- get_metric(metric)
- merge(other)
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
optimized_circuit:
Optional
[str
]
-
optimized_instruction_count:
Optional
[int
]
- record_metric(metric, value)
- classmethod validate_all_fields_exist(value)
Validate that all expected MetricsType flags have defined fields.