Skip to content

Conversation

@DrozdovMK
Copy link

An error occurs when using sklearn.pipeline.FeatureUnion with FeatureAugmenter in transformer_list. When calling the set_output(transform="pandas") method on the FeatureUnion object, it triggers iterative method calls for all objects specified in transformer_list.

The custom transformer must implement the set_output method to be compatible with scikit-learn's API. Otherwise we get an error:

if not hasattr(estimator, "set_output"):
--> 458 raise ValueError(
459 f"Unable to configure output for {estimator} because set_output "
460 "is not available."
461 )

@nils-braun
Copy link
Collaborator

Thanks @DrozdovMK for the contribution (and sorry for the delay in the review). I am fine with your code changes. Can you add a very small trivial unit test for your use case so that we can ensure, it will not be problematic again in the future?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants