ModelInferenceTime

class ModelInferenceTime[source]

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

Parameters
number_of_samplesint , default: 1000

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

__init__(number_of_samples: int = 1000)[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.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.

Example