From 645a109b1d8a417b402fa61b0631199bea631fb0 Mon Sep 17 00:00:00 2001 From: Petr Onderka Date: Fri, 22 May 2026 16:55:08 +0200 Subject: [PATCH 1/2] Add warning to only load trusted models --- .../how-to-guides/save-load-machine-learning-models-ml-net.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/machine-learning/how-to-guides/save-load-machine-learning-models-ml-net.md b/docs/machine-learning/how-to-guides/save-load-machine-learning-models-ml-net.md index 4741480af1cb1..f7a059317d2d2 100644 --- a/docs/machine-learning/how-to-guides/save-load-machine-learning-models-ml-net.md +++ b/docs/machine-learning/how-to-guides/save-load-machine-learning-models-ml-net.md @@ -91,6 +91,10 @@ mlContext.Model.ConvertToOnnx(trainedModel, data, stream); ## Load a model stored locally +> [!IMPORTANT] +> +> Only load models from trusted sources. Loading models from untrusted sources is a security risk. + Models stored locally can be used in other processes or applications like ASP.NET Core and serverless web apps. For more information, see [Use ML.NET in Web API](./serve-model-web-api-ml-net.md) and [Deploy ML.NET Serverless Web App](./serve-model-serverless-azure-functions-ml-net.md). In a separate application or process, use the [`Load`](xref:Microsoft.ML.ModelOperationsCatalog.Load%2A) method along with the file path to get the trained model into your application. From 3da7bc93f141c24c2c14c82a6ec5a9a20e430403 Mon Sep 17 00:00:00 2001 From: Genevieve Warren <24882762+gewarren@users.noreply.github.com> Date: Fri, 22 May 2026 18:44:03 -0700 Subject: [PATCH 2/2] Apply suggestion from @gewarren --- .../how-to-guides/save-load-machine-learning-models-ml-net.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/machine-learning/how-to-guides/save-load-machine-learning-models-ml-net.md b/docs/machine-learning/how-to-guides/save-load-machine-learning-models-ml-net.md index f7a059317d2d2..88c3c82739b1c 100644 --- a/docs/machine-learning/how-to-guides/save-load-machine-learning-models-ml-net.md +++ b/docs/machine-learning/how-to-guides/save-load-machine-learning-models-ml-net.md @@ -92,7 +92,6 @@ mlContext.Model.ConvertToOnnx(trainedModel, data, stream); ## Load a model stored locally > [!IMPORTANT] -> > Only load models from trusted sources. Loading models from untrusted sources is a security risk. Models stored locally can be used in other processes or applications like ASP.NET Core and serverless web apps. For more information, see [Use ML.NET in Web API](./serve-model-web-api-ml-net.md) and [Deploy ML.NET Serverless Web App](./serve-model-serverless-azure-functions-ml-net.md).