ModelInferenceTime#

class ModelInferenceTime[source]#

Measure model average inference time (in seconds) per sample.

Parameters
n_samplesint , default: 1000

number of samples to use for inference, but if actual dataset is smaller then all samples will be used

__init__(n_samples: int = 1000, **kwargs)[source]#
__new__(*args, **kwargs)#

Methods

ModelInferenceTime.add_condition(name, ...)

Add new condition function to the check.

ModelInferenceTime.add_condition_inference_time_is_not_greater_than([value])

Add condition - checking that the average model inference time (in seconds) per sample is not greater than X.

ModelInferenceTime.clean_conditions()

Remove all conditions from this check instance.

ModelInferenceTime.conditions_decision(result)

Run conditions on given result.

ModelInferenceTime.finalize_check_result(...)

Finalize the check result by adding the check instance and processing the conditions.

ModelInferenceTime.metadata([with_doc_link])

Return check metadata.

ModelInferenceTime.name()

Name of class in split camel case.

ModelInferenceTime.params([show_defaults])

Return parameters to show when printing the check.

ModelInferenceTime.remove_condition(index)

Remove given condition by index.

ModelInferenceTime.run(dataset[, model])

Run check.

ModelInferenceTime.run_logic(context[, ...])

Run check.

Examples#