Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/new-windows-ml/initialize-execution-providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ operation.Progress = (asyncInfo, progressInfo) =>

// Display the progress to the user
Progress = normalizedProgress;
};
});
};

// Await for the download and install to complete
Expand Down Expand Up @@ -630,6 +630,7 @@ with initialize(options=InitializeOptions.ON_NO_MATCH_SHOW_UI):
# Download and make ready missing EPs if the user wants to
if any(provider.ready_state == winml.ExecutionProviderReadyState.NOT_PRESENT for provider in providers):
# Ask the user if they want to download the missing packages
user_wants_to_download = True # Replace with user prompt logic
if user_wants_to_download:
for provider in [provider for provider in providers if provider.ready_state == winml.ExecutionProviderReadyState.NOT_PRESENT]:
provider.ensure_ready_async().get()
Expand Down
2 changes: 1 addition & 1 deletion docs/new-windows-ml/models.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Windows ML works with ONNX format models, since Windows ML is simply a distribut
| **[1. Use models from AI Toolkit](#option-1-use-models-from-ai-toolkit)** | Choose from [over 20+ OSS models](https://github.com/microsoft/olive-recipes/blob/main/.aitk/docs/guide/ModelList.md) (including LLMs and other types of models) that are ready-to-optimize for use with Windows ML using [AI Toolkit's Conversion tool](https://code.visualstudio.com/docs/intelligentapps/modelconversion) |
| **[2. Use other existing ONNX models](#option-2-use-other-existing-onnx-models)** | Browse over 30,000+ [pre-trained ONNX models from Hugging Face](https://huggingface.co/models?library=onnx) or other sources |
| **[3. Convert existing models to ONNX format](#option-3-convert-existing-models-to-onnx-format)** | Browse over 2,400,000+ [pre-trained PyTorch / TensorFlow / etc models from Hugging Face](https://huggingface.co/models) or other sources and convert them to ONNX |
| **[4. Fine-tune existing models](#option-4-fine-tune-existing-models)** | Fine-tune over 2,400,000+ [pre-trained PyTorch / TensorFlow / etc models from Hugging Face](https://huggingface.co/models) or other sources to work better for your scenario (and convert them to ONNX format)
| **[4. Fine-tune existing models](#option-4-fine-tune-existing-models)** | Fine-tune over 2,400,000+ [pre-trained PyTorch / TensorFlow / etc models from Hugging Face](https://huggingface.co/models) or other sources to work better for your scenario (and convert them to ONNX format) |
| **[5. Train models](#option-5-train-models)** | Train your own models in PyTorch, TensorFlow, or other frameworks, and convert them to ONNX |

You can also choose from dozens of ready-to-use AI models and APIs in Microsoft Foundry on Windows, which run via Windows ML. See [Use local AI with Microsoft Foundry on Windows](../overview.md) to learn more.
Expand Down
2 changes: 2 additions & 0 deletions docs/new-windows-ml/run-onnx-models.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ compileApi->ReleaseModelCompilationOptions(compileOptions);
#### [Python](#tab/python)

```python
import os

input_model_path = "path_to_your_model.onnx"
output_model_path = "path_to_your_compiled_model.onnx"

Expand Down
6 changes: 4 additions & 2 deletions docs/new-windows-ml/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,10 @@ std::filesystem::path modelPathToUse = isCompiledModelAvailable ? compiledModelP
### [Python](#tab/python)

```python
model_path = "path to your original model"
compiled_model_path = "path to your compiled model"
from pathlib import Path

model_path = Path("path to your original model")
compiled_model_path = Path("path to your compiled model")

if compiled_model_path.exists():
print("Using compiled model")
Expand Down
2 changes: 2 additions & 0 deletions docs/new-windows-ml/versioning.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ BOOL CALLBACK LogProviderVersionCallback(
const WinMLEpInfo* info,
void* context)
{
if (info == nullptr) return TRUE;

// Log the name
printf("Windows ML EP: %s\n", info->name);

Expand Down