You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a component is structured in a way that it can use some other component, we are currently using a SubComponent object to specify which other component to use. For example, our One-Versus-All (Ova) class can turn any binary classifier into a multi-class classifier. So it has a SubComponent PredictorType field on its Arguments class, and users can specify which binary classifier that Ova should use.
The issues with SubComponent are:
They depend on Dependency Injection in order to create the object.
They use "magic strings" in order to create the object (since SubComponents are just strings to tell the DI system how to create the object).
In our main API, we shouldn't be using magic strings, or dependency injection, when you can simply just create objects, or delegates/factories, like a normal OOP API would work.
Activity
Replace SubComponent with IComponentFactory in ML.Ensemble
Replace SubComponent with IComponentFactory in ML.Ensemble
Replace all ML.Transforms SubComponent usages with IComponentFactory.
Replace SubComponent with IComponentFactory in ML.Ensemble (#681)
Replace all ML.Transforms SubComponent usages with IComponentFactory.
Replace all ML.Transforms SubComponent usages with IComponentFactory.
Replace all ML.Transforms SubComponent usages with IComponentFactory. (
Remove SubComponent usage from ML.PipelineInference.
Remove SubComponent usage from ML.PipelineInference.
Remove SubComponent usage from ML.PipelineInference. (#817)
eerhardt commentedon Sep 8, 2018
This work is now complete. SubComponent no longer exists in ML.NET.