diff --git a/src/Microsoft.Extensions.ML/Builder/BuilderExtensions.cs b/src/Microsoft.Extensions.ML/Builder/BuilderExtensions.cs index ebeb366086..45ededdb10 100644 --- a/src/Microsoft.Extensions.ML/Builder/BuilderExtensions.cs +++ b/src/Microsoft.Extensions.ML/Builder/BuilderExtensions.cs @@ -158,6 +158,25 @@ public static PredictionEnginePoolBuilder FromFile + /// Adds the model at the specified file to the builder. + /// + /// The builder to which to add the model. + /// The location of the model. + /// + /// Whether to watch for changes to the file path and update the model when the file is changed or not. + /// + /// + /// The updated . + /// + public static PredictionEnginePoolBuilder FromFile( + this PredictionEnginePoolBuilder builder, string filePath, bool watchForChanges) + where TData : class + where TPrediction : class, new() + { + return builder.FromFile(string.Empty, filePath, watchForChanges); + } + /// /// Adds the model at the specified file to the builder. ///