openvino_genai.ImageGenerationPerfMetrics#
- class openvino_genai.ImageGenerationPerfMetrics#
Bases:
pybind11_object
Holds performance metrics for each generate call.
PerfMetrics holds fields with mean and standard deviations for the following metrics: - Generate iteration duration, ms - Inference duration for unet model, ms - Inference duration for transformer model, ms
Additional fields include: - Load time, ms - Generate total duration, ms - inference durations for each encoder, ms - inference duration of vae_encoder model, ms - inference duration of vae_decoder model, ms
Preferable way to access values is via get functions. Getters calculate mean and std values from raw_metrics and return pairs. If mean and std were already calculated, getters return cached values.
- Parameters:
get_text_encoder_infer_duration (Dict[str, float]) – Returns the inference duration of every text encoder in milliseconds.
get_vae_encoder_infer_duration (float) – Returns the inference duration of vae encoder in milliseconds.
get_vae_decoder_infer_duration (float) – Returns the inference duration of vae decoder in milliseconds.
get_load_time (float) – Returns the load time in milliseconds.
get_generate_duration (float) – Returns the generate duration in milliseconds.
get_inference_duration (float) – Returns the total inference durations (including encoder, unet/transformer and decoder inference) in milliseconds.
get_first_and_other_iter_duration (tuple) – Returns the first iteration duration and the average duration of other iterations in one generation in milliseconds.
get_iteration_duration (MeanStdPair) – Returns the mean and standard deviation of one generation iteration in milliseconds.
get_first_and_second_unet_infer_duration (tuple) – Returns the first inference duration and the average duration of other inferences in one generation in milliseconds.
get_unet_infer_duration (MeanStdPair) – Returns the mean and standard deviation of one unet inference in milliseconds.
get_first_and_other_trans_infer_duration (tuple) – Returns the first inference duration and the average duration of other inferences in one generation in milliseconds.
get_transformer_infer_duration (MeanStdPair) – Returns the mean and standard deviation of one transformer inference in milliseconds.
raw_metrics (RawImageGenerationPerfMetrics) – A structure of RawImageGenerationPerfMetrics type that holds raw metrics.
- __init__(self: openvino_genai.py_openvino_genai.ImageGenerationPerfMetrics) None #
Methods
__delattr__
(name, /)Implement delattr(self, name).
__dir__
()Default dir() implementation.
__eq__
(value, /)Return self==value.
__format__
(format_spec, /)Default object formatter.
__ge__
(value, /)Return self>=value.
__getattribute__
(name, /)Return getattr(self, name).
__gt__
(value, /)Return self>value.
__hash__
()Return hash(self).
__init__
(self)This method is called when a class is subclassed.
__le__
(value, /)Return self<=value.
__lt__
(value, /)Return self<value.
__ne__
(value, /)Return self!=value.
__new__
(**kwargs)Helper for pickle.
__reduce_ex__
(protocol, /)Helper for pickle.
__repr__
()Return repr(self).
__setattr__
(name, value, /)Implement setattr(self, name, value).
Size of object in memory, in bytes.
__str__
()Return str(self).
Abstract classes can override this to customize issubclass().
get_generate_duration
(self)get_inference_duration
(self)get_iteration_duration
(self)get_load_time
(self)get_unet_infer_duration
(self)Attributes
- __class__#
alias of
pybind11_type
- __delattr__(name, /)#
Implement delattr(self, name).
- __dir__()#
Default dir() implementation.
- __eq__(value, /)#
Return self==value.
- __format__(format_spec, /)#
Default object formatter.
- __ge__(value, /)#
Return self>=value.
- __getattribute__(name, /)#
Return getattr(self, name).
- __gt__(value, /)#
Return self>value.
- __hash__()#
Return hash(self).
- __init__(self: openvino_genai.py_openvino_genai.ImageGenerationPerfMetrics) None #
- __init_subclass__()#
This method is called when a class is subclassed.
The default implementation does nothing. It may be overridden to extend subclasses.
- __le__(value, /)#
Return self<=value.
- __lt__(value, /)#
Return self<value.
- __ne__(value, /)#
Return self!=value.
- __new__(**kwargs)#
- __reduce__()#
Helper for pickle.
- __reduce_ex__(protocol, /)#
Helper for pickle.
- __repr__()#
Return repr(self).
- __setattr__(name, value, /)#
Implement setattr(self, name, value).
- __sizeof__()#
Size of object in memory, in bytes.
- __str__()#
Return str(self).
- __subclasshook__()#
Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).
- get_first_and_other_iter_duration(self: openvino_genai.py_openvino_genai.ImageGenerationPerfMetrics) tuple #
- get_first_and_other_trans_infer_duration(self: openvino_genai.py_openvino_genai.ImageGenerationPerfMetrics) tuple #
- get_first_and_other_unet_infer_duration(self: openvino_genai.py_openvino_genai.ImageGenerationPerfMetrics) tuple #
- get_generate_duration(self: openvino_genai.py_openvino_genai.ImageGenerationPerfMetrics) float #
- get_inference_duration(self: openvino_genai.py_openvino_genai.ImageGenerationPerfMetrics) float #
- get_iteration_duration(self: openvino_genai.py_openvino_genai.ImageGenerationPerfMetrics) openvino_genai.py_openvino_genai.MeanStdPair #
- get_load_time(self: openvino_genai.py_openvino_genai.ImageGenerationPerfMetrics) float #
- get_text_encoder_infer_duration(self: openvino_genai.py_openvino_genai.ImageGenerationPerfMetrics) dict[str, float] #
- get_transformer_infer_duration(self: openvino_genai.py_openvino_genai.ImageGenerationPerfMetrics) openvino_genai.py_openvino_genai.MeanStdPair #
- get_unet_infer_duration(self: openvino_genai.py_openvino_genai.ImageGenerationPerfMetrics) openvino_genai.py_openvino_genai.MeanStdPair #
- get_vae_decoder_infer_duration(self: openvino_genai.py_openvino_genai.ImageGenerationPerfMetrics) float #
- get_vae_encoder_infer_duration(self: openvino_genai.py_openvino_genai.ImageGenerationPerfMetrics) float #
- property raw_metrics#