.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "checks_gallery/tabular/methodology/plot_model_inference_time.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note Click :ref:`here ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_checks_gallery_tabular_methodology_plot_model_inference_time.py: Model Inference Time ******************** .. GENERATED FROM PYTHON SOURCE LINES 8-16 .. code-block:: default from sklearn.datasets import load_iris from sklearn.ensemble import AdaBoostClassifier from sklearn.model_selection import train_test_split from deepchecks.tabular import Dataset from deepchecks.tabular.checks.methodology import ModelInferenceTime .. GENERATED FROM PYTHON SOURCE LINES 17-26 .. code-block:: default iris = load_iris(as_frame=True) train, test = train_test_split(iris.frame, test_size=0.33, random_state=42) train_ds = Dataset(train, features=iris.feature_names, label='target') test_ds = Dataset(test, features=iris.feature_names, label='target') clf = AdaBoostClassifier().fit(train_ds.data[train_ds.features], train_ds.data[train_ds.label_name]) .. GENERATED FROM PYTHON SOURCE LINES 27-31 .. code-block:: default check = ModelInferenceTime() check.run(test_ds, clf) .. raw:: html

Model Inference Time

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

Additional Outputs
Average model inference time for one sample (in seconds): 0.00011077


.. GENERATED FROM PYTHON SOURCE LINES 32-34 Instantiating check instance with condition =========================================== .. GENERATED FROM PYTHON SOURCE LINES 34-37 .. code-block:: default check = ModelInferenceTime().add_condition_inference_time_is_not_greater_than(0.00001) check.run(test_ds, clf) .. raw:: html

Model Inference Time

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

Conditions Summary
Status Condition More Info
Average model inference time for one sample is not greater than 1e-05 Found average inference time (in seconds) above threshold: 0.00011366
Additional Outputs
Average model inference time for one sample (in seconds): 0.00011366


.. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 0.089 seconds) .. _sphx_glr_download_checks_gallery_tabular_methodology_plot_model_inference_time.py: .. only :: html .. container:: sphx-glr-footer :class: sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_model_inference_time.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_model_inference_time.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_