-
-
Notifications
You must be signed in to change notification settings - Fork 25.9k
False positive warning in FunctionTransformer
#26552
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Maybe @thomasjpfan has already in mind what is wrong here before that I investigate the problem. |
OK, seeing the code in encoder_dropping_None = make_pipeline(
OneHotEncoder(sparse_output=False).set_output(transform="pandas"),
FunctionTransformer(_drop_None_cols),
)
encoder_dropping_None.fit_transform(test_df) Somehow, it is expected that I provide Looking at what is required, it makes somehow sense. However, I would not be surprised if a user set the output on the pipeline instead of going through each estimator and thinking if you really want to rewrap or not the output. I don't really know what is best here. |
In the original code, the warning is raised when we call |
We might want to delay the raise of the warning |
It seems that |
I agree the warning is a false positive. I opened #26944 to fix it. |
Uh oh!
There was an error while loading. Please reload this page.
While looking at #26543, I find out that we raise a
FutureWarning
that looked like a false positive to me:Indeed, my function
func
is returning a dataframe and the output of the transform is indeed a dataframe. So the warning is a bit surprising. Using the global config (i.e.set_config
will not raise this warning).The text was updated successfully, but these errors were encountered: