diff --git a/python/dalex/dalex/model_explanations/_variable_importance/utils.py b/python/dalex/dalex/model_explanations/_variable_importance/utils.py index 2a147e28..f92431a6 100644 --- a/python/dalex/dalex/model_explanations/_variable_importance/utils.py +++ b/python/dalex/dalex/model_explanations/_variable_importance/utils.py @@ -95,7 +95,7 @@ def calculate_loss(loss_function, observed, predicted, sample_weights=None): if supports_weight: return loss_function(observed, predicted, sample_weight=sample_weights) else: - if sample_weights: + if sample_weights is not None: warnings.warn( f"Loss function {loss_function.__name__} does not take sample weights. Calculating unweighted loss." )