.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "checks_gallery/tabular/model_evaluation/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_model_evaluation_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 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]) .. rst-class:: sphx-glr-script-out Out: .. code-block:: none /home/runner/work/deepchecks/deepchecks/deepchecks/tabular/dataset.py:581: UserWarning: It is recommended to initialize Dataset with categorical features by doing "Dataset(df, cat_features=categorical_list)". No categorical features were passed, therefore heuristically inferring categorical features in the data. 0 categorical features were inferred .. GENERATED FROM PYTHON SOURCE LINES 27-31 .. code-block:: default check = ModelInferenceTime() check.run(test_ds, clf) .. raw:: html
Model Inference Time


.. 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


.. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 0.198 seconds) .. _sphx_glr_download_checks_gallery_tabular_model_evaluation_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 `_