qat.purr.backends.qblox.metrics_base module
- class MetricsManager(enabled_metrics=<MetricsType.Default: 6>, **kwargs)
Bases:
BaseModel
Pydantic version based on qat.purr.compiler.metrics.py elements.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- are_enabled(metric)
- as_dict()
Generates a dictionary of the valid metrics.
- enable(enabled_metrics, overwrite=False)
Enable these sets of metrics for collection. If overwrite is True then the passed-in values will overwrite existing ones.
- enable_metrics(enabled_metrics=None, overwrite=True)
Enables the set of metrics in the current collection. If overwrite is set to true, or there are no compilation metrics it’ll create a new collection, if overwrite is false it’ll enable these metrics in the currently-active 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.