Skip to content

Commit e7bf06b

Browse files
committed
Fix broken notebook test
Signed-off-by: Gaurav Gupta <gaugup@microsoft.com>
1 parent 68dadc8 commit e7bf06b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

dice_ml/explainer_interfaces/explainer_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def _validate_counterfactual_configuration(
6767
raise UserConfigValidationException('The stopping_threshold should lie between {0} and {1}'.format(
6868
str(0.0), str(1.0)))
6969

70-
if posthoc_sparsity_param < 0.0 or posthoc_sparsity_param > 1.0:
70+
if posthoc_sparsity_param is not None and (posthoc_sparsity_param < 0.0 or posthoc_sparsity_param > 1.0):
7171
raise UserConfigValidationException('The posthoc_sparsity_param should lie between {0} and {1}'.format(
7272
str(0.0), str(1.0)))
7373

0 commit comments

Comments
 (0)