diff --git a/src/Microsoft.Extensions.ML/Builder/BuilderExtensions.cs b/src/Microsoft.Extensions.ML/Builder/BuilderExtensions.cs
index 45ededdb10..a311014ed9 100644
--- a/src/Microsoft.Extensions.ML/Builder/BuilderExtensions.cs
+++ b/src/Microsoft.Extensions.ML/Builder/BuilderExtensions.cs
@@ -20,6 +20,7 @@ public static class BuilderExtensions
///
/// The updated .
///
+ /// Only add models from trusted sources. Adding models from untrusted sources is a security risk.
public static PredictionEnginePoolBuilder FromUri(
this PredictionEnginePoolBuilder builder, string uri)
where TData : class
@@ -41,6 +42,7 @@ public static PredictionEnginePoolBuilder FromUri
/// The updated .
///
+ /// Only add models from trusted sources. Adding models from untrusted sources is a security risk.
public static PredictionEnginePoolBuilder FromUri(
this PredictionEnginePoolBuilder builder, string modelName, string uri)
where TData : class
@@ -62,6 +64,7 @@ public static PredictionEnginePoolBuilder FromUri
/// The updated .
///
+ /// Only add models from trusted sources. Adding models from untrusted sources is a security risk.
public static PredictionEnginePoolBuilder FromUri(
this PredictionEnginePoolBuilder builder, string modelName, Uri uri)
where TData : class where TPrediction : class, new()
@@ -80,6 +83,7 @@ public static PredictionEnginePoolBuilder FromUri
/// The updated .
///
+ /// Only add models from trusted sources. Adding models from untrusted sources is a security risk.
public static PredictionEnginePoolBuilder FromUri(
this PredictionEnginePoolBuilder builder, string uri, TimeSpan period)
where TData : class where TPrediction : class, new()
@@ -103,6 +107,7 @@ public static PredictionEnginePoolBuilder FromUri
/// The updated .
///
+ /// Only add models from trusted sources. Adding models from untrusted sources is a security risk.
public static PredictionEnginePoolBuilder FromUri(
this PredictionEnginePoolBuilder builder, string modelName, string uri, TimeSpan period)
where TData : class
@@ -127,6 +132,7 @@ public static PredictionEnginePoolBuilder FromUri
/// The updated .
///
+ /// Only add models from trusted sources. Adding models from untrusted sources is a security risk.
public static PredictionEnginePoolBuilder FromUri(
this PredictionEnginePoolBuilder builder, string modelName, Uri uri, TimeSpan period)
where TData : class
@@ -150,6 +156,7 @@ public static PredictionEnginePoolBuilder FromUri
/// The updated .
///
+ /// Only add models from trusted sources. Adding models from untrusted sources is a security risk.
public static PredictionEnginePoolBuilder FromFile(
this PredictionEnginePoolBuilder builder, string filePath)
where TData : class
@@ -169,6 +176,7 @@ public static PredictionEnginePoolBuilder FromFile
/// The updated .
///
+ /// Only add models from trusted sources. Adding models from untrusted sources is a security risk.
public static PredictionEnginePoolBuilder FromFile(
this PredictionEnginePoolBuilder builder, string filePath, bool watchForChanges)
where TData : class
@@ -190,6 +198,7 @@ public static PredictionEnginePoolBuilder FromFile
/// The updated .
///
+ /// Only add models from trusted sources. Adding models from untrusted sources is a security risk.
public static PredictionEnginePoolBuilder FromFile(
this PredictionEnginePoolBuilder builder, string modelName, string filePath)
where TData : class
@@ -214,6 +223,7 @@ public static PredictionEnginePoolBuilder FromFile
/// The updated .
///
+ /// Only add models from trusted sources. Adding models from untrusted sources is a security risk.
public static PredictionEnginePoolBuilder FromFile(
this PredictionEnginePoolBuilder builder, string modelName, string filePath, bool watchForChanges)
where TData : class
diff --git a/src/Microsoft.ML.Data/Model/ModelOperationsCatalog.cs b/src/Microsoft.ML.Data/Model/ModelOperationsCatalog.cs
index 26f13c71b8..6c098890fd 100644
--- a/src/Microsoft.ML.Data/Model/ModelOperationsCatalog.cs
+++ b/src/Microsoft.ML.Data/Model/ModelOperationsCatalog.cs
@@ -142,6 +142,7 @@ private void SaveInputSchema(DataViewSchema inputSchema, RepositoryWriter rep)
/// Will contain the input schema for the model. If the model was saved without
/// any description of the input, there will be no input schema. In this case this can be .
/// The loaded model.
+ /// Only load models from trusted sources. Loading models from untrusted sources is a security risk.
///
///
/// Will contain the input schema for the model. If the model was saved without
/// any description of the input, there will be no input schema. In this case this can be .
/// The loaded model.
+ /// Only load models from trusted sources. Loading models from untrusted sources is a security risk.
///
///
/// loader)
/// this method will throw an exception. The scenario where no loader is stored in the stream should
/// be handled instead using the method.
/// The transformer model from the model stream.
+ /// Only load models from trusted sources. Loading models from untrusted sources is a security risk.
public ITransformer LoadWithDataLoader(Stream stream, out IDataLoader loader)
{
_env.CheckValue(stream, nameof(stream));
@@ -283,6 +286,7 @@ public ITransformer LoadWithDataLoader(Stream stream, out IDataLoader method.
/// The transformer model from the model file.
+ /// Only load models from trusted sources. Loading models from untrusted sources is a security risk.
public ITransformer LoadWithDataLoader(string filePath, out IDataLoader loader)
{
_env.CheckNonEmpty(filePath, nameof(filePath));
diff --git a/src/Microsoft.ML.OnnxTransformer/OnnxCatalog.cs b/src/Microsoft.ML.OnnxTransformer/OnnxCatalog.cs
index 210e13e849..7903981c24 100644
--- a/src/Microsoft.ML.OnnxTransformer/OnnxCatalog.cs
+++ b/src/Microsoft.ML.OnnxTransformer/OnnxCatalog.cs
@@ -20,9 +20,12 @@ public static class OnnxCatalog
/// and how to run it on a GPU.
///
///
+ ///
/// The name/type of input columns must exactly match name/type of the ONNX model inputs.
/// The name/type of the produced output columns will match name/type of the ONNX model outputs.
/// If the gpuDeviceId value is the value will be used if it is not .
+ ///
+ /// Only apply models from trusted sources. Applying models from untrusted sources is a security risk.
///
/// The transform's catalog.
/// The path of the file containing the ONNX model.
@@ -48,9 +51,12 @@ public static OnnxScoringEstimator ApplyOnnxModel(this TransformsCatalog catalog
/// and how to run it on a GPU.
///
///
+ ///
/// The name/type of input columns must exactly match name/type of the ONNX model inputs.
/// The name/type of the produced output columns will match name/type of the ONNX model outputs.
/// If the gpuDeviceId value is the value will be used if it is not .
+ ///
+ /// Only apply models from trusted sources. Applying models from untrusted sources is a security risk.
///
/// The transform's catalog.
/// The containing the model bytes.
@@ -76,9 +82,12 @@ public static OnnxScoringEstimator ApplyOnnxModel(this TransformsCatalog catalog
/// and how to run it on a GPU.
///
///
+ ///
/// The name/type of input columns must exactly match name/type of the ONNX model inputs.
/// The name/type of the produced output columns will match name/type of the ONNX model outputs.
/// If the gpuDeviceId value is the value will be used if it is not .
+ ///
+ /// Only apply models from trusted sources. Applying models from untrusted sources is a security risk.
///
/// The transform's catalog.
/// The path of the file containing the ONNX model.
@@ -112,9 +121,12 @@ public static OnnxScoringEstimator ApplyOnnxModel(this TransformsCatalog catalog
/// and how to run it on a GPU.
///
///
+ ///
/// The name/type of input columns must exactly match name/type of the ONNX model inputs.
/// The name/type of the produced output columns will match name/type of the ONNX model outputs.
/// If the gpuDeviceId value is the value will be used if it is not .
+ ///
+ /// Only apply models from trusted sources. Applying models from untrusted sources is a security risk.
///
/// The transform's catalog.
/// The containing the model bytes.
@@ -153,7 +165,10 @@ public static OnnxScoringEstimator ApplyOnnxModel(this TransformsCatalog catalog
/// Optional GPU device ID to run execution on, to run on CPU.
/// If GPU error, raise exception or fallback to CPU.
///
+ ///
/// If the gpuDeviceId value is the value will be used if it is not .
+ ///
+ /// Only apply models from trusted sources. Applying models from untrusted sources is a security risk.
///
///
///
@@ -185,7 +200,10 @@ public static OnnxScoringEstimator ApplyOnnxModel(this TransformsCatalog catalog
/// Optional GPU device ID to run execution on, to run on CPU.
/// If GPU error, raise exception or fallback to CPU.
///
+ ///
/// If the gpuDeviceId value is the value will be used if it is not .
+ ///
+ /// Only apply models from trusted sources. Applying models from untrusted sources is a security risk.
///
///
///
@@ -211,7 +229,10 @@ public static OnnxScoringEstimator ApplyOnnxModel(this TransformsCatalog catalog
/// and how to run it on a GPU.
///
///
+ ///
/// If the options.GpuDeviceId value is the value will be used if it is not .
+ ///
+ /// Only apply models from trusted sources. Applying models from untrusted sources is a security risk.
///
/// The transform's catalog.
/// Options for the .
@@ -238,7 +259,10 @@ public static OnnxScoringEstimator ApplyOnnxModel(this TransformsCatalog catalog
/// Optional GPU device ID to run execution on, to run on CPU.
/// If GPU error, raise exception or fallback to CPU.
///
+ ///
/// If the gpuDeviceId value is the value will be used if it is not .
+ ///
+ /// Only apply models from trusted sources. Applying models from untrusted sources is a security risk.
///
///
///
@@ -276,7 +300,10 @@ public static OnnxScoringEstimator ApplyOnnxModel(this TransformsCatalog catalog
/// Optional GPU device ID to run execution on, to run on CPU.
/// If GPU error, raise exception or fallback to CPU.
///
+ ///
/// If the gpuDeviceId value is the value will be used if it is not .
+ ///
+ /// Only apply models from trusted sources. Applying models from untrusted sources is a security risk.
///
///
///
@@ -310,7 +337,10 @@ public static OnnxScoringEstimator ApplyOnnxModel(this TransformsCatalog catalog
/// Optional GPU device ID to run execution on, to run on CPU.
/// If GPU error, raise exception or fallback to CPU.
///
+ ///
/// If the gpuDeviceId value is the value will be used if it is not .
+ ///
+ /// Only apply models from trusted sources. Applying models from untrusted sources is a security risk.
///
public static OnnxScoringEstimator ApplyOnnxModel(this TransformsCatalog catalog,
string[] outputColumnNames,
@@ -335,7 +365,10 @@ public static OnnxScoringEstimator ApplyOnnxModel(this TransformsCatalog catalog
/// Optional GPU device ID to run execution on, to run on CPU.
/// If GPU error, raise exception or fallback to CPU.
///
+ ///
/// If the gpuDeviceId value is the value will be used if it is not .
+ ///
+ /// Only apply models from trusted sources. Applying models from untrusted sources is a security risk.
///
public static OnnxScoringEstimator ApplyOnnxModel(this TransformsCatalog catalog,
string[] outputColumnNames,
@@ -364,7 +397,10 @@ public static OnnxScoringEstimator ApplyOnnxModel(this TransformsCatalog catalog
/// Optional GPU device ID to run execution on, to run on CPU.
/// If GPU error, raise exception or fallback to CPU.
///
+ ///
/// If the gpuDeviceId value is the value will be used if it is not .
+ ///
+ /// Only apply models from trusted sources. Applying models from untrusted sources is a security risk.
///
public static OnnxScoringEstimator ApplyOnnxModel(this TransformsCatalog catalog,
string[] outputColumnNames,
@@ -394,7 +430,10 @@ public static OnnxScoringEstimator ApplyOnnxModel(this TransformsCatalog catalog
/// Optional GPU device ID to run execution on, to run on CPU.
/// If GPU error, raise exception or fallback to CPU.
///
+ ///
/// If the gpuDeviceId value is the value will be used if it is not .
+ ///
+ /// Only apply models from trusted sources. Applying models from untrusted sources is a security risk.
///
public static OnnxScoringEstimator ApplyOnnxModel(this TransformsCatalog catalog,
string[] outputColumnNames,
@@ -425,7 +464,10 @@ public static OnnxScoringEstimator ApplyOnnxModel(this TransformsCatalog catalog
/// If GPU error, raise exception or fallback to CPU.
/// Optional, specifies the Protobuf CodedInputStream recursion limit. Default value is 100.
///
+ ///
/// If the gpuDeviceId value is the value will be used if it is not .
+ ///
+ /// Only apply models from trusted sources. Applying models from untrusted sources is a security risk.
///
public static OnnxScoringEstimator ApplyOnnxModel(this TransformsCatalog catalog,
string[] outputColumnNames,
@@ -457,7 +499,10 @@ public static OnnxScoringEstimator ApplyOnnxModel(this TransformsCatalog catalog
/// If GPU error, raise exception or fallback to CPU.
/// Optional, specifies the Protobuf CodedInputStream recursion limit. Default value is 100.
///
+ ///
/// If the gpuDeviceId value is the value will be used if it is not .
+ ///
+ /// Only apply models from trusted sources. Applying models from untrusted sources is a security risk.
///
public static OnnxScoringEstimator ApplyOnnxModel(this TransformsCatalog catalog,
string[] outputColumnNames,
diff --git a/src/Microsoft.ML.TensorFlow/TensorflowCatalog.cs b/src/Microsoft.ML.TensorFlow/TensorflowCatalog.cs
index 372d4b1029..78790cdfbd 100644
--- a/src/Microsoft.ML.TensorFlow/TensorflowCatalog.cs
+++ b/src/Microsoft.ML.TensorFlow/TensorflowCatalog.cs
@@ -26,6 +26,7 @@ public static class TensorflowCatalog
///
/// The transform's catalog.
/// Location of the TensorFlow model.
+ /// Only load models from trusted sources. Loading models from untrusted sources is a security risk.
///
///
/// The transform's catalog.
/// Location of the TensorFlow model.
/// If the first dimension of the output is unknown, should it be treated as batched or not.
+ /// Only load models from trusted sources. Loading models from untrusted sources is a security risk.
///
///
///