diff --git a/docs/new-windows-ml/initialize-execution-providers.md b/docs/new-windows-ml/initialize-execution-providers.md index 4f44118b..41183265 100644 --- a/docs/new-windows-ml/initialize-execution-providers.md +++ b/docs/new-windows-ml/initialize-execution-providers.md @@ -262,7 +262,7 @@ operation.Progress = (asyncInfo, progressInfo) => // Display the progress to the user Progress = normalizedProgress; - }; + }); }; // Await for the download and install to complete @@ -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() diff --git a/docs/new-windows-ml/models.md b/docs/new-windows-ml/models.md index 638c52a9..440212dc 100644 --- a/docs/new-windows-ml/models.md +++ b/docs/new-windows-ml/models.md @@ -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. diff --git a/docs/new-windows-ml/run-onnx-models.md b/docs/new-windows-ml/run-onnx-models.md index e5c5fc50..d0797135 100644 --- a/docs/new-windows-ml/run-onnx-models.md +++ b/docs/new-windows-ml/run-onnx-models.md @@ -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" diff --git a/docs/new-windows-ml/tutorial.md b/docs/new-windows-ml/tutorial.md index d94ed0d3..12205c07 100644 --- a/docs/new-windows-ml/tutorial.md +++ b/docs/new-windows-ml/tutorial.md @@ -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") diff --git a/docs/new-windows-ml/versioning.md b/docs/new-windows-ml/versioning.md index 4c5b8ff8..ad99d1e0 100644 --- a/docs/new-windows-ml/versioning.md +++ b/docs/new-windows-ml/versioning.md @@ -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);