From 1cf4747c21aa2f14e8dfcf2486bd219c0d4d9020 Mon Sep 17 00:00:00 2001 From: Shahab Moradi Date: Sun, 21 Apr 2019 08:49:33 -0700 Subject: [PATCH 1/2] Added xml for the exotic overload of CreatePredictionEngine. This is P4 API, and we rarely use it even in our codebase. So we don't have samples for it. --- src/Microsoft.ML.Data/Model/ModelOperationsCatalog.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Microsoft.ML.Data/Model/ModelOperationsCatalog.cs b/src/Microsoft.ML.Data/Model/ModelOperationsCatalog.cs index 9d85d1c720..93de509653 100644 --- a/src/Microsoft.ML.Data/Model/ModelOperationsCatalog.cs +++ b/src/Microsoft.ML.Data/Model/ModelOperationsCatalog.cs @@ -317,6 +317,15 @@ public PredictionEngine CreatePredictionEngine(ITransfor return transformer.CreatePredictionEngine(_env, ignoreMissingColumns, inputSchemaDefinition, outputSchemaDefinition); } + /// + /// Create a prediction engine for one-time prediction. + /// It's mainly used in conjunction with , + /// where input schema is extracted during loading the model. + /// + /// The class that defines the input data. + /// The class that defines the output data. + /// The transformer to use for prediction. + /// Input schema. public PredictionEngine CreatePredictionEngine(ITransformer transformer, DataViewSchema inputSchema) where TSrc : class where TDst : class, new() From 1289c8d626e2425653d0a21e283c8643ccb7f535 Mon Sep 17 00:00:00 2001 From: Shahab Moradi Date: Sun, 21 Apr 2019 10:15:05 -0700 Subject: [PATCH 2/2] More refinement --- src/Microsoft.ML.Data/Model/ModelOperationsCatalog.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.ML.Data/Model/ModelOperationsCatalog.cs b/src/Microsoft.ML.Data/Model/ModelOperationsCatalog.cs index 93de509653..1010960220 100644 --- a/src/Microsoft.ML.Data/Model/ModelOperationsCatalog.cs +++ b/src/Microsoft.ML.Data/Model/ModelOperationsCatalog.cs @@ -292,7 +292,7 @@ public ITransformer LoadWithDataLoader(string filePath, out IDataLoader - /// Create a prediction engine for one-time prediction. + /// Create a prediction engine for one-time prediction (default usage). /// /// The class that defines the input data. /// The class that defines the output data.