sklearn_adapter: Better error message for invalid X
X needs to be a dataframe currently. Print the type of X in the
exception message so it's clearer to users what is not supported.
@@ -44,7 +44,7 @@ class _SklearnModel(BaseEstimator, MetaEstimatorMixin, RegressorMixin):
"""
if not isinstance(X, pd.DataFrame):
- raise ValueError("X must be a DataFrame")
+ raise ValueError("X must be a DataFrame. Got type: {}".format(type(X)))
X = X.copy()
