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
{{ message }}
Remove Google.Protobuf dependency from Microsoft.ML #162
What did you do?
Install the base Microsoft.ML nuget package
What happened?
It also adds a reference to Google.Protobuf
What did you expect?
I expected that the base Microsoft.ML nuget package would have minimal dependencies. From my understanding, Google.Protobuf is only used in ML.NET for the ONNX support, which isn't needed all of the time. We should move the ONNX support into a separate NuGet package that developers can opt into. That way developers who aren't using this functionality won't need to pay for this dependency.
is the only place that uses this dependency. This project should be factored out of the base package, similar to what we've done with the Microsoft.ML.Parquet package.
Technical difficulties aside for the moment, I'd like to understand what policy we're proposing to adopt. Certainly up till now the criteria for taking a nuget dependency has never previously been that it is "needed all of the time," nor would I agree that's a reasonable policy since as far as I see nothing here is needed all of the time.
The idea being that a user opts in to functionality and dependencies as they need it. For example, that way someone who isn't using CNTK or LighGBM doesn't need to take dependencies on them.
A good starting policy I'd propose would be something along the lines of "If the majority of ML.NET users aren't going to use a set of functionality, it shouldn't be in the core NuGet package. Especially if there are external dependencies or size considerations when including the functionality."
The situation is very, very different from the Parquet loader or the CNTK learner wrapper, from a technical perspective. The Parquet loader is a specific IDataLoader implementation, but no existing core component's behavior changes due to its presence. It is completely isolated. On the other hand, ONNX exporting, like all exporting in this codebase, is done by having the component (either an IDataTransform or IPredictor) implement an interface, i.e., ICanSaveOnnx or one of the descending more specific interfaces.
Yes, abstracting away the classes the components actually interact with behind interfaces will allow us to do this. I have published a PR linked above.
Activity
shauheen commentedon May 15, 2018
The protobuf dependency is for ONNX export. We need this as the feature becomes available.
TomFinley commentedon May 15, 2018
Technical difficulties aside for the moment, I'd like to understand what policy we're proposing to adopt. Certainly up till now the criteria for taking a nuget dependency has never previously been that it is "needed all of the time," nor would I agree that's a reasonable policy since as far as I see nothing here is needed all of the time.
eerhardt commentedon May 15, 2018
I don't think there has been a previous criteria.
@glebuk and I met a few weeks ago, and here was our rough sketch for what the NuGet layout should look like:
The idea being that a user opts in to functionality and dependencies as they need it. For example, that way someone who isn't using CNTK or LighGBM doesn't need to take dependencies on them.
A good starting policy I'd propose would be something along the lines of "If the majority of ML.NET users aren't going to use a set of functionality, it shouldn't be in the core NuGet package. Especially if there are external dependencies or size considerations when including the functionality."
TomFinley commentedon May 15, 2018
The situation is very, very different from the Parquet loader or the CNTK learner wrapper, from a technical perspective. The Parquet loader is a specific
IDataLoaderimplementation, but no existing core component's behavior changes due to its presence. It is completely isolated. On the other hand, ONNX exporting, like all exporting in this codebase, is done by having the component (either anIDataTransformorIPredictor) implement an interface, i.e.,ICanSaveOnnxor one of the descending more specific interfaces.markusweimer commentedon May 16, 2018
TomFinley, would it be possible to externalize the export functionality from the classes? That way, the ONNX export could be its own NuGet.
TomFinley commentedon Jun 30, 2018
Yes, abstracting away the classes the components actually interact with behind interfaces will allow us to do this. I have published a PR linked above.
Sanitize the column names in CLI (dotnet#162)
code migration from machinelearning-automl to machinelearning repo fe…
Sanitize the column names in CLI (dotnet#162)
Added onnx export functionality for LpNormNormalizingTransformer (#4161)
Added Onnx export functionality to PCATransformer (#4188)