evalml icon indicating copy to clipboard operation
evalml copied to clipboard

Update label encoder in pipeline implementation to look for LabelEncoder class instead of looking for "Label Encoder"

Open angela97lin opened this issue 3 years ago • 1 comments

https://github.com/alteryx/evalml/pull/2821/ introduces the label encoder as a component in the pipeline, rather than an attribute. However, we still set a pipeline's _encoder attribute to a label encoder in the pipeline, if it's available.

As documented in this comment, there is an assumption that the Label Encoder component has a name "Label Encoder". However, we should be more flexible and accept the label encoder even if its name was "my cool label encoder".

One suggestion is to find the component by checking for the component class instead. This work would be made much easier by https://github.com/alteryx/evalml/issues/2878.

One edge case that may be important to think about the case where there may be multiple label encoders. What do we do then?

angela97lin avatar Oct 14 '21 01:10 angela97lin

I added the needs design tag to this to cover the discussion of the edge case. I think when we agree on a way forward for the multiple label encoders case, we can begin work.

chukarsten avatar Oct 20 '21 18:10 chukarsten