8000 Make better common test for `set_output` · Issue #24931 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content
Make better common test for set_output #24931
Closed
@glemaitre

Description

@glemaitre

We have a common test checking that set_output lead to the right results. However, there are some side-effect that we did not anticipate and that are not covered right now.

set_config

One can require a pandas output with set_config:

import sklearn

sklearn.set_config(transform_output="pandas")

while the common test is setting the estimator using set_output, set_config (and config_context) will set the output of the nested estimators. This is something that is not tested and leads to failures as shown in #24923.

We need to add a common test with the context manager to ensure that transformers with nested transformer(s) are still working as expected.

Undefined behaviour

I did not yet make a check but I think that we should make sure to define the following behaviour:

  • request pandas output without providing dataframe at fit and transform
  • request pandas output without providing dataframe at transform

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0