Added more warnings to only load trusted models#54135
Open
svick wants to merge 2 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends the ML.NET security guidance that models should only come from trusted sources by adding [!IMPORTANT] warnings to additional tutorials and how-to guides. It also attempts to fix invalid code in deep-learning-overview.md by correcting the ONNX pipeline example.
Changes:
- Add “only load/apply trusted models” [!IMPORTANT] warnings across several ML.NET articles that demonstrate loading or applying pretrained models.
- Update the ONNX example in
deep-learning-overview.md(but the TensorFlow and ONNX snippets still need corrections to be valid, per review comments). - Add the same warning to model-serving guides (wording should be aligned with the established “load models” phrasing).
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/machine-learning/tutorials/text-classification-tf.md | Adds an IMPORTANT warning before loading a pretrained TensorFlow model. |
| docs/machine-learning/tutorials/object-detection-onnx.md | Adds an IMPORTANT warning near the ApplyOnnxModel pipeline step. |
| docs/machine-learning/tutorials/object-detection-custom-vision-onnx.md | Adds an IMPORTANT warning before applying an ONNX model in the pipeline. |
| docs/machine-learning/tutorials/image-classification.md | Adds an IMPORTANT warning before loading/scoring with a TensorFlow model. |
| docs/machine-learning/how-to-guides/serve-model-web-api-ml-net.md | Adds an IMPORTANT warning before registering/loading a model for serving (needs wording consistency). |
| docs/machine-learning/how-to-guides/serve-model-serverless-azure-functions-ml-net.md | Adds an IMPORTANT warning before registering/loading a model for serving (needs wording consistency). |
| docs/machine-learning/how-to-guides/retrain-model-ml-net.md | Adds an IMPORTANT warning before loading a pretrained model. |
| docs/machine-learning/how-to-guides/machine-learning-model-predictions-ml-net.md | Adds an IMPORTANT warning before loading a model for predictions. |
| docs/machine-learning/deep-learning-overview.md | Adds an IMPORTANT warning and modifies the ONNX snippet (still needs fixes for correctness). |
gewarren
approved these changes
Jun 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a followup to #53999, which adds the same warning to more articles that mention loading ML.NET models.
Also fixes invalid code in deep-learning-overview.md.
Internal previews