File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88import pytest
99import torch
1010from scipy .stats import uniform
11+ from skbase .utils .dependencies import _check_soft_dependencies
1112from sklearn .metrics import accuracy_score , r2_score
1213from sklearn .model_selection import KFold
1314
@@ -542,6 +543,10 @@ def _test_captum(
542543 assert exp .shape [1 ] == tabular_model .model .hparams .continuous_dim + tabular_model .model .hparams .categorical_dim
543544
544545
546+ @pytest .mark .skipif (
547+ not _check_soft_dependencies ("captum" , severity = "none" ),
548+ reason = "skip captum integration test if captum is not installed" ,
549+ )
545550@pytest .mark .parametrize ("model_config_class" , MODEL_CONFIG_CAPTUM_TEST )
546551@pytest .mark .parametrize ("continuous_cols" , [list (DATASET_CONTINUOUS_COLUMNS )])
547552@pytest .mark .parametrize ("categorical_cols" , [["HouseAgeBin" ], []])
@@ -592,6 +597,10 @@ def test_captum_integration_regression(
592597 )
593598
594599
600+ @pytest .mark .skipif (
601+ not _check_soft_dependencies ("captum" , severity = "none" ),
602+ reason = "skip captum integration test if captum is not installed" ,
603+ )
595604@pytest .mark .parametrize ("model_config_class" , MODEL_CONFIG_CAPTUM_TEST )
596605@pytest .mark .parametrize (
597606 "continuous_cols" ,
You can’t perform that action at this time.
0 commit comments