MNT more informative warning in estimator_checks
@@ -2242,9 +2242,11 @@ def check_set_params(name, estimator_orig):
except (TypeError, ValueError) as e:
e_type = e.__class__.__name__
# Exception occurred, possibly parameter validation
- warnings.warn("{} occurred during set_params. "
- "It is recommended to delay parameter "
- "validation until fit.".format(e_type))
+ warnings.warn("{0} occurred during set_params of param {1} on "
+ "{2}. It is recommended to delay parameter "
+ "validation until fit.".format(e_type,
+ param_name,
+ name))
change_warning_msg = "Estimator's parameters changed after " \
"set_params raised {}".format(e_type)
