Skip to content

Commit bef37c4

Browse files
authored
Correct disabling of CatBoost SHAP (#1692)
1 parent df5db1e commit bef37c4

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

tests/test_model_builders.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,11 @@
5757

5858
# CatBoost's SHAP value calculation seems to be buggy
5959
# See https://github.com/catboost/catboost/issues/2556
60-
# Disable SHAP tests temporarily
61-
catboost_shap_temp_disabled_on = datetime(2024, 1, 1)
62-
# Check once per month
63-
catboost_skip_shap = datetime.today().month == catboost_shap_temp_disabled_on.month
60+
# Disable SHAP tests temporarily until it's next major version
61+
if cb_available:
62+
catboost_skip_shap = tuple(map(int, cb.__version__.split("."))) < (1, 3, 0)
63+
else:
64+
catboost_skip_shap = True
6465
catboost_skip_shap_msg = (
6566
"CatBoost SHAP calculation is buggy. "
6667
"See https://github.com/catboost/catboost/issues/2556."

0 commit comments

Comments
 (0)