-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Internalize concepts of IDataTransform/Loader/TransformTemplate. #1995
Comments
One example of this that I ran across is the
This is a In this case, happily, it looks like making this a generic parameter was completely pointless, so it can just be removed and the base class of the scorer used directly (but internally!!) in the abstract base class. But it is at least an interesting example of how badly we started "mixing our metaphors" when the new idioms of #581 were being introduced. |
Before we had the
IEstimator
/ITransformer
/IDataView
triad (see #581), we combined all three concepts insideIDataTransform
. The initialization, the data, and the data model were all conflated. This was the source for years of constant confusion internally. We of course had to abandon the idea when we were trying to make an API. Here's the interface, for reference:machinelearning/src/Microsoft.ML.Data/Data/IDataLoader.cs
Line 90 in 2e67134
Similarly, before we had
IDataReaderEstimator
/IDataReader
/IDataView
triad, we combined all three concepts insideIDataLoader
.machinelearning/src/Microsoft.ML.Data/Data/IDataLoader.cs
Line 53 in 2e67134
We also have the old concept of
ITransformTemplate
, which theITransformer
interface has likewise obviated.We've introduced the new concepts over the course of the last half year or so, which is great, yet the artifacts of the old world remain. The interfaces should be made internal so people don't stumble into using them. Further, the objects used through
ITransform
andIDataView
should (even when still backed by anIDataTransform
object!) be hidden so it is not obvious these concepts are being conflated internally, even if "under the hood" there is just a small shim to present what is (internally) anIDataTransform
as publicly anITransformer
/IDataView
. (Always with the aim, of course, of having the architecture reflect the shape it presents as its public surface, but what we can refactor over some time we can at least hide now.)The text was updated successfully, but these errors were encountered: