From 279c03b1de6ce432da02c5f2c7561a421edd2044 Mon Sep 17 00:00:00 2001 From: Chao Zhang Date: Wed, 11 Mar 2026 14:35:19 +0800 Subject: [PATCH 01/12] winml 2.0 --- .aitk/requirements/requirements-Profiling.txt | 9 ++++++--- .aitk/requirements/requirements-QNN_LLM.txt | 9 ++++++--- .aitk/requirements/requirements-WCR.txt | 9 ++++++--- .aitk/requirements/requirements-WCR_CUDA.txt | 9 ++++++--- .aitk/requirements/requirements-WCR_INIT.txt | 9 ++++++--- 5 files changed, 30 insertions(+), 15 deletions(-) diff --git a/.aitk/requirements/requirements-Profiling.txt b/.aitk/requirements/requirements-Profiling.txt index 519a01d9d..896e6c5be 100644 --- a/.aitk/requirements/requirements-Profiling.txt +++ b/.aitk/requirements/requirements-Profiling.txt @@ -10,13 +10,16 @@ onnxruntime-genai-winml==0.12.1 # We also need to uninstall in case user tries new version, uses previous version and then updates again # because uninstalling winml will remove onnxruntime folder but we will not install windowsml to add it back # uvpip:uninstall onnxruntime-windowsml;pre -onnxruntime-windowsml==1.23.2.202512041916 +./onnxruntime_windowsml-1.24.3.202603051904.dev0-cp312-cp312-win_amd64.whl +# download:onnxruntime_windowsml-1.24.3.202603051904.dev0-cp312-cp312-win_amd64.whl packaging==24.2 protobuf==5.29.6 pyreadline3==3.5.4 sympy==1.14.0 -wasdk-Microsoft.Windows.AI.MachineLearning==1.8.251106002 -wasdk-Microsoft.Windows.ApplicationModel.DynamicDependency.Bootstrap==1.8.251106002 +./wasdk_microsoft_windows_ai_machinelearning-2.0.0.dev0-cp312-cp312-win_amd64.whl +# download:wasdk_microsoft_windows_ai_machinelearning-2.0.0.dev0-cp312-cp312-win_amd64.whl +./wasdk_microsoft_windows_applicationmodel_dynamicdependency_bootstrap-2.0.0.dev0-cp312-cp312-win_amd64.whl +# download:wasdk_microsoft_windows_applicationmodel_dynamicdependency_bootstrap-2.0.0.dev0-cp312-cp312-win_amd64.whl # winrt-runtime==3.2.1 winrt-runtime==3.2.1 # winrt-Windows.Foundation==3.2.1 diff --git a/.aitk/requirements/requirements-QNN_LLM.txt b/.aitk/requirements/requirements-QNN_LLM.txt index e53e799f7..a10669bc8 100644 --- a/.aitk/requirements/requirements-QNN_LLM.txt +++ b/.aitk/requirements/requirements-QNN_LLM.txt @@ -26,7 +26,8 @@ onnxruntime-genai-winml==0.12.1 # We also need to uninstall in case user tries new version, uses previous version and then updates again # because uninstalling winml will remove onnxruntime folder but we will not install windowsml to add it back # uvpip:uninstall onnxruntime-windowsml;pre -onnxruntime-windowsml==1.23.2.202512041916 +./onnxruntime_windowsml-1.24.3.202603051904.dev0-cp312-cp312-win_amd64.whl +# download:onnxruntime_windowsml-1.24.3.202603051904.dev0-cp312-cp312-win_amd64.whl packaging==24.2 parso==0.8.5 platformdirs==4.4.0 @@ -44,8 +45,10 @@ stack-data==0.6.3 sympy==1.14.0 tornado==6.4.2 traitlets==5.14.3 -wasdk-Microsoft.Windows.AI.MachineLearning==1.8.251106002 -wasdk-Microsoft.Windows.ApplicationModel.DynamicDependency.Bootstrap==1.8.251106002 +./wasdk_microsoft_windows_ai_machinelearning-2.0.0.dev0-cp312-cp312-win_amd64.whl +# download:wasdk_microsoft_windows_ai_machinelearning-2.0.0.dev0-cp312-cp312-win_amd64.whl +./wasdk_microsoft_windows_applicationmodel_dynamicdependency_bootstrap-2.0.0.dev0-cp312-cp312-win_amd64.whl +# download:wasdk_microsoft_windows_applicationmodel_dynamicdependency_bootstrap-2.0.0.dev0-cp312-cp312-win_amd64.whl wcwidth==0.2.13 widgetsnbextension==4.0.13 # winrt-runtime==3.2.1 diff --git a/.aitk/requirements/requirements-WCR.txt b/.aitk/requirements/requirements-WCR.txt index 2a4bf3ab4..d1ff05aac 100644 --- a/.aitk/requirements/requirements-WCR.txt +++ b/.aitk/requirements/requirements-WCR.txt @@ -63,7 +63,8 @@ onnxruntime-genai-winml==0.12.1 # We also need to uninstall in case user tries new version, uses previous version and then updates again # because uninstalling winml will remove onnxruntime folder but we will not install windowsml to add it back # uvpip:uninstall onnxruntime-windowsml;pre -onnxruntime-windowsml==1.23.2.202512041916 +./onnxruntime_windowsml-1.24.3.202603051904.dev0-cp312-cp312-win_amd64.whl +# download:onnxruntime_windowsml-1.24.3.202603051904.dev0-cp312-cp312-win_amd64.whl onnxscript==0.5.3 # optimum==1.26.1 optimum==1.26.1 @@ -115,8 +116,10 @@ typing-extensions==4.15.0 typing-inspection==0.4.1 tzdata==2025.2 urllib3==2.6.3 -wasdk-Microsoft.Windows.AI.MachineLearning==1.8.251106002 -wasdk-Microsoft.Windows.ApplicationModel.DynamicDependency.Bootstrap==1.8.251106002 +./wasdk_microsoft_windows_ai_machinelearning-2.0.0.dev0-cp312-cp312-win_amd64.whl +# download:wasdk_microsoft_windows_ai_machinelearning-2.0.0.dev0-cp312-cp312-win_amd64.whl +./wasdk_microsoft_windows_applicationmodel_dynamicdependency_bootstrap-2.0.0.dev0-cp312-cp312-win_amd64.whl +# download:wasdk_microsoft_windows_applicationmodel_dynamicdependency_bootstrap-2.0.0.dev0-cp312-cp312-win_amd64.whl wcwidth==0.2.13 widgetsnbextension==4.0.13 # winrt-runtime==3.2.1 diff --git a/.aitk/requirements/requirements-WCR_CUDA.txt b/.aitk/requirements/requirements-WCR_CUDA.txt index 00c5c38b7..81191742e 100644 --- a/.aitk/requirements/requirements-WCR_CUDA.txt +++ b/.aitk/requirements/requirements-WCR_CUDA.txt @@ -64,7 +64,8 @@ onnxruntime-genai-winml==0.12.1 # We also need to uninstall in case user tries new version, uses previous version and then updates again # because uninstalling winml will remove onnxruntime folder but we will not install windowsml to add it back # uvpip:uninstall onnxruntime-windowsml;pre -onnxruntime-windowsml==1.23.2.202512041916 +./onnxruntime_windowsml-1.24.3.202603051904.dev0-cp312-cp312-win_amd64.whl +# download:onnxruntime_windowsml-1.24.3.202603051904.dev0-cp312-cp312-win_amd64.whl onnxscript==0.5.3 # optimum==1.26.1 optimum==1.26.1 @@ -117,8 +118,10 @@ typing-extensions==4.15.0 typing-inspection==0.4.1 tzdata==2025.2 urllib3==2.6.3 -wasdk-Microsoft.Windows.AI.MachineLearning==1.8.251106002 -wasdk-Microsoft.Windows.ApplicationModel.DynamicDependency.Bootstrap==1.8.251106002 +./wasdk_microsoft_windows_ai_machinelearning-2.0.0.dev0-cp312-cp312-win_amd64.whl +# download:wasdk_microsoft_windows_ai_machinelearning-2.0.0.dev0-cp312-cp312-win_amd64.whl +./wasdk_microsoft_windows_applicationmodel_dynamicdependency_bootstrap-2.0.0.dev0-cp312-cp312-win_amd64.whl +# download:wasdk_microsoft_windows_applicationmodel_dynamicdependency_bootstrap-2.0.0.dev0-cp312-cp312-win_amd64.whl wcwidth==0.2.13 widgetsnbextension==4.0.13 # winrt-runtime==3.2.1 diff --git a/.aitk/requirements/requirements-WCR_INIT.txt b/.aitk/requirements/requirements-WCR_INIT.txt index 595177ccc..ed11abb78 100644 --- a/.aitk/requirements/requirements-WCR_INIT.txt +++ b/.aitk/requirements/requirements-WCR_INIT.txt @@ -7,13 +7,16 @@ numpy==2.2.4 # We also need to uninstall in case user tries new version, uses previous version and then updates again # because uninstalling winml will remove onnxruntime folder but we will not install windowsml to add it back # uvpip:uninstall onnxruntime-windowsml;pre -onnxruntime-windowsml==1.23.2.202512041916 +./onnxruntime_windowsml-1.24.3.202603051904.dev0-cp312-cp312-win_amd64.whl +# download:onnxruntime_windowsml-1.24.3.202603051904.dev0-cp312-cp312-win_amd64.whl packaging==24.2 protobuf==5.29.6 pyreadline3==3.5.4 sympy==1.14.0 -wasdk-Microsoft.Windows.AI.MachineLearning==1.8.251106002 -wasdk-Microsoft.Windows.ApplicationModel.DynamicDependency.Bootstrap==1.8.251106002 +./wasdk_microsoft_windows_ai_machinelearning-2.0.0.dev0-cp312-cp312-win_amd64.whl +# download:wasdk_microsoft_windows_ai_machinelearning-2.0.0.dev0-cp312-cp312-win_amd64.whl +./wasdk_microsoft_windows_applicationmodel_dynamicdependency_bootstrap-2.0.0.dev0-cp312-cp312-win_amd64.whl +# download:wasdk_microsoft_windows_applicationmodel_dynamicdependency_bootstrap-2.0.0.dev0-cp312-cp312-win_amd64.whl # winrt-runtime==3.2.1 winrt-runtime==3.2.1 # winrt-Windows.Foundation==3.2.1 From 517e9ed9521cb94e2fe59fe446deae7691493755 Mon Sep 17 00:00:00 2001 From: hualxie Date: Thu, 9 Apr 2026 16:29:22 +0800 Subject: [PATCH 02/12] use windowsml --- .aitk/requirements/requirements-Profiling.txt | 14 ++++---------- .aitk/requirements/requirements-QNN_LLM.txt | 14 ++++---------- .aitk/requirements/requirements-WCR.txt | 14 ++++---------- .aitk/requirements/requirements-WCR_CUDA.txt | 14 ++++---------- .aitk/requirements/requirements-WCR_INIT.txt | 14 ++++---------- 5 files changed, 20 insertions(+), 50 deletions(-) diff --git a/.aitk/requirements/requirements-Profiling.txt b/.aitk/requirements/requirements-Profiling.txt index 896e6c5be..4e4587860 100644 --- a/.aitk/requirements/requirements-Profiling.txt +++ b/.aitk/requirements/requirements-Profiling.txt @@ -6,20 +6,14 @@ numpy==2.2.4 # onnx==1.17.0 onnx==1.17.0 onnxruntime-genai-winml==0.12.1 -# uvpip:uninstall onnxruntime-winml;pre -# We also need to uninstall in case user tries new version, uses previous version and then updates again -# because uninstalling winml will remove onnxruntime folder but we will not install windowsml to add it back -# uvpip:uninstall onnxruntime-windowsml;pre -./onnxruntime_windowsml-1.24.3.202603051904.dev0-cp312-cp312-win_amd64.whl -# download:onnxruntime_windowsml-1.24.3.202603051904.dev0-cp312-cp312-win_amd64.whl +./onnxruntime_windowsml-1.24.4.202603181718-cp312-cp312-win_amd64.whl packaging==24.2 protobuf==5.29.6 pyreadline3==3.5.4 sympy==1.14.0 -./wasdk_microsoft_windows_ai_machinelearning-2.0.0.dev0-cp312-cp312-win_amd64.whl -# download:wasdk_microsoft_windows_ai_machinelearning-2.0.0.dev0-cp312-cp312-win_amd64.whl -./wasdk_microsoft_windows_applicationmodel_dynamicdependency_bootstrap-2.0.0.dev0-cp312-cp312-win_amd64.whl -# download:wasdk_microsoft_windows_applicationmodel_dynamicdependency_bootstrap-2.0.0.dev0-cp312-cp312-win_amd64.whl +# uvpip:uninstall wasdk-Microsoft.Windows.AI.MachineLearning;pre +# uvpip:uninstall wasdk-Microsoft.Windows.ApplicationModel.DynamicDependency.Bootstrap;pre +windowsml==2.0.297rc0 # winrt-runtime==3.2.1 winrt-runtime==3.2.1 # winrt-Windows.Foundation==3.2.1 diff --git a/.aitk/requirements/requirements-QNN_LLM.txt b/.aitk/requirements/requirements-QNN_LLM.txt index 281ef6cc4..a2bbbfda4 100644 --- a/.aitk/requirements/requirements-QNN_LLM.txt +++ b/.aitk/requirements/requirements-QNN_LLM.txt @@ -22,12 +22,7 @@ mpmath==1.3.0 nest-asyncio==1.6.0 numpy==2.2.4 onnxruntime-genai-winml==0.12.1 -# uvpip:uninstall onnxruntime-winml;pre -# We also need to uninstall in case user tries new version, uses previous version and then updates again -# because uninstalling winml will remove onnxruntime folder but we will not install windowsml to add it back -# uvpip:uninstall onnxruntime-windowsml;pre -./onnxruntime_windowsml-1.24.3.202603051904.dev0-cp312-cp312-win_amd64.whl -# download:onnxruntime_windowsml-1.24.3.202603051904.dev0-cp312-cp312-win_amd64.whl +./onnxruntime_windowsml-1.24.4.202603181718-cp312-cp312-win_amd64.whl packaging==24.2 parso==0.8.5 platformdirs==4.4.0 @@ -45,10 +40,9 @@ stack-data==0.6.3 sympy==1.14.0 tornado==6.5.5 traitlets==5.14.3 -./wasdk_microsoft_windows_ai_machinelearning-2.0.0.dev0-cp312-cp312-win_amd64.whl -# download:wasdk_microsoft_windows_ai_machinelearning-2.0.0.dev0-cp312-cp312-win_amd64.whl -./wasdk_microsoft_windows_applicationmodel_dynamicdependency_bootstrap-2.0.0.dev0-cp312-cp312-win_amd64.whl -# download:wasdk_microsoft_windows_applicationmodel_dynamicdependency_bootstrap-2.0.0.dev0-cp312-cp312-win_amd64.whl +# uvpip:uninstall wasdk-Microsoft.Windows.AI.MachineLearning;pre +# uvpip:uninstall wasdk-Microsoft.Windows.ApplicationModel.DynamicDependency.Bootstrap;pre +windowsml==2.0.297rc0 wcwidth==0.2.13 widgetsnbextension==4.0.13 # winrt-runtime==3.2.1 diff --git a/.aitk/requirements/requirements-WCR.txt b/.aitk/requirements/requirements-WCR.txt index 550a33be9..702b22738 100644 --- a/.aitk/requirements/requirements-WCR.txt +++ b/.aitk/requirements/requirements-WCR.txt @@ -59,12 +59,7 @@ olive-ai==0.10.1 onnx==1.17.0 onnx-ir==0.1.10 onnxruntime-genai-winml==0.12.1 -# uvpip:uninstall onnxruntime-winml;pre -# We also need to uninstall in case user tries new version, uses previous version and then updates again -# because uninstalling winml will remove onnxruntime folder but we will not install windowsml to add it back -# uvpip:uninstall onnxruntime-windowsml;pre -./onnxruntime_windowsml-1.24.3.202603051904.dev0-cp312-cp312-win_amd64.whl -# download:onnxruntime_windowsml-1.24.3.202603051904.dev0-cp312-cp312-win_amd64.whl +./onnxruntime_windowsml-1.24.4.202603181718-cp312-cp312-win_amd64.whl onnxscript==0.5.3 # optimum==1.26.1 optimum==1.26.1 @@ -116,10 +111,9 @@ typing-extensions==4.15.0 typing-inspection==0.4.1 tzdata==2025.2 urllib3==2.6.3 -./wasdk_microsoft_windows_ai_machinelearning-2.0.0.dev0-cp312-cp312-win_amd64.whl -# download:wasdk_microsoft_windows_ai_machinelearning-2.0.0.dev0-cp312-cp312-win_amd64.whl -./wasdk_microsoft_windows_applicationmodel_dynamicdependency_bootstrap-2.0.0.dev0-cp312-cp312-win_amd64.whl -# download:wasdk_microsoft_windows_applicationmodel_dynamicdependency_bootstrap-2.0.0.dev0-cp312-cp312-win_amd64.whl +# uvpip:uninstall wasdk-Microsoft.Windows.AI.MachineLearning;pre +# uvpip:uninstall wasdk-Microsoft.Windows.ApplicationModel.DynamicDependency.Bootstrap;pre +windowsml==2.0.297rc0 wcwidth==0.2.13 widgetsnbextension==4.0.13 # winrt-runtime==3.2.1 diff --git a/.aitk/requirements/requirements-WCR_CUDA.txt b/.aitk/requirements/requirements-WCR_CUDA.txt index a3a5311c0..a8297ea73 100644 --- a/.aitk/requirements/requirements-WCR_CUDA.txt +++ b/.aitk/requirements/requirements-WCR_CUDA.txt @@ -60,12 +60,7 @@ olive-ai==0.10.1 onnx==1.17.0 onnx-ir==0.1.10 onnxruntime-genai-winml==0.12.1 -# uvpip:uninstall onnxruntime-winml;pre -# We also need to uninstall in case user tries new version, uses previous version and then updates again -# because uninstalling winml will remove onnxruntime folder but we will not install windowsml to add it back -# uvpip:uninstall onnxruntime-windowsml;pre -./onnxruntime_windowsml-1.24.3.202603051904.dev0-cp312-cp312-win_amd64.whl -# download:onnxruntime_windowsml-1.24.3.202603051904.dev0-cp312-cp312-win_amd64.whl +./onnxruntime_windowsml-1.24.4.202603181718-cp312-cp312-win_amd64.whl onnxscript==0.5.3 # optimum==1.26.1 optimum==1.26.1 @@ -118,10 +113,9 @@ typing-extensions==4.15.0 typing-inspection==0.4.1 tzdata==2025.2 urllib3==2.6.3 -./wasdk_microsoft_windows_ai_machinelearning-2.0.0.dev0-cp312-cp312-win_amd64.whl -# download:wasdk_microsoft_windows_ai_machinelearning-2.0.0.dev0-cp312-cp312-win_amd64.whl -./wasdk_microsoft_windows_applicationmodel_dynamicdependency_bootstrap-2.0.0.dev0-cp312-cp312-win_amd64.whl -# download:wasdk_microsoft_windows_applicationmodel_dynamicdependency_bootstrap-2.0.0.dev0-cp312-cp312-win_amd64.whl +# uvpip:uninstall wasdk-Microsoft.Windows.AI.MachineLearning;pre +# uvpip:uninstall wasdk-Microsoft.Windows.ApplicationModel.DynamicDependency.Bootstrap;pre +windowsml==2.0.297rc0 wcwidth==0.2.13 widgetsnbextension==4.0.13 # winrt-runtime==3.2.1 diff --git a/.aitk/requirements/requirements-WCR_INIT.txt b/.aitk/requirements/requirements-WCR_INIT.txt index ed11abb78..2d97b198a 100644 --- a/.aitk/requirements/requirements-WCR_INIT.txt +++ b/.aitk/requirements/requirements-WCR_INIT.txt @@ -3,20 +3,14 @@ flatbuffers==25.2.10 humanfriendly==10.0 mpmath==1.3.0 numpy==2.2.4 -# uvpip:uninstall onnxruntime-winml;pre -# We also need to uninstall in case user tries new version, uses previous version and then updates again -# because uninstalling winml will remove onnxruntime folder but we will not install windowsml to add it back -# uvpip:uninstall onnxruntime-windowsml;pre -./onnxruntime_windowsml-1.24.3.202603051904.dev0-cp312-cp312-win_amd64.whl -# download:onnxruntime_windowsml-1.24.3.202603051904.dev0-cp312-cp312-win_amd64.whl +./onnxruntime_windowsml-1.24.4.202603181718-cp312-cp312-win_amd64.whl packaging==24.2 protobuf==5.29.6 pyreadline3==3.5.4 sympy==1.14.0 -./wasdk_microsoft_windows_ai_machinelearning-2.0.0.dev0-cp312-cp312-win_amd64.whl -# download:wasdk_microsoft_windows_ai_machinelearning-2.0.0.dev0-cp312-cp312-win_amd64.whl -./wasdk_microsoft_windows_applicationmodel_dynamicdependency_bootstrap-2.0.0.dev0-cp312-cp312-win_amd64.whl -# download:wasdk_microsoft_windows_applicationmodel_dynamicdependency_bootstrap-2.0.0.dev0-cp312-cp312-win_amd64.whl +# uvpip:uninstall wasdk-Microsoft.Windows.AI.MachineLearning;pre +# uvpip:uninstall wasdk-Microsoft.Windows.ApplicationModel.DynamicDependency.Bootstrap;pre +windowsml==2.0.297rc0 # winrt-runtime==3.2.1 winrt-runtime==3.2.1 # winrt-Windows.Foundation==3.2.1 From 8a43932a8188a37d2c9bc8f6d93a48c778c33729 Mon Sep 17 00:00:00 2001 From: hualxie Date: Thu, 9 Apr 2026 17:05:20 +0800 Subject: [PATCH 03/12] cleanup unused packages --- .aitk/requirements/requirements-WCR.txt | 7 +------ .aitk/requirements/requirements-WCR_INIT.txt | 7 +------ 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/.aitk/requirements/requirements-WCR.txt b/.aitk/requirements/requirements-WCR.txt index 702b22738..84374500f 100644 --- a/.aitk/requirements/requirements-WCR.txt +++ b/.aitk/requirements/requirements-WCR.txt @@ -116,11 +116,6 @@ urllib3==2.6.3 windowsml==2.0.297rc0 wcwidth==0.2.13 widgetsnbextension==4.0.13 -# winrt-runtime==3.2.1 -winrt-runtime==3.2.1 -# winrt-Windows.Foundation==3.2.1 -winrt-Windows.Foundation==3.2.1 -# winrt-Windows.Foundation.Collections==3.2.1 -winrt-Windows.Foundation.Collections==3.2.1 +# uvpip:uninstall winrt-runtime winrt-Windows.Foundation winrt-Windows.Foundation.Collections;pre xxhash==3.5.0 yarl==1.20.1 diff --git a/.aitk/requirements/requirements-WCR_INIT.txt b/.aitk/requirements/requirements-WCR_INIT.txt index 2d97b198a..ba14bab25 100644 --- a/.aitk/requirements/requirements-WCR_INIT.txt +++ b/.aitk/requirements/requirements-WCR_INIT.txt @@ -11,10 +11,5 @@ sympy==1.14.0 # uvpip:uninstall wasdk-Microsoft.Windows.AI.MachineLearning;pre # uvpip:uninstall wasdk-Microsoft.Windows.ApplicationModel.DynamicDependency.Bootstrap;pre windowsml==2.0.297rc0 -# winrt-runtime==3.2.1 -winrt-runtime==3.2.1 -# winrt-Windows.Foundation==3.2.1 -winrt-Windows.Foundation==3.2.1 -# winrt-Windows.Foundation.Collections==3.2.1 -winrt-Windows.Foundation.Collections==3.2.1 +# uvpip:uninstall winrt-runtime winrt-Windows.Foundation winrt-Windows.Foundation.Collections;pre # not in requires From 099bd7d806268fba529011c2e87e1ca287fb015a Mon Sep 17 00:00:00 2001 From: hualxie Date: Mon, 20 Apr 2026 11:10:10 +0800 Subject: [PATCH 04/12] still need to clean up --- .aitk/requirements/requirements-QNN_LLM.txt | 6 +++--- .aitk/requirements/requirements-WCR.txt | 2 +- .aitk/requirements/requirements-WCR_CUDA.txt | 2 +- .aitk/requirements/requirements-WCR_INIT.txt | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.aitk/requirements/requirements-QNN_LLM.txt b/.aitk/requirements/requirements-QNN_LLM.txt index a2bbbfda4..be768f4f6 100644 --- a/.aitk/requirements/requirements-QNN_LLM.txt +++ b/.aitk/requirements/requirements-QNN_LLM.txt @@ -22,7 +22,7 @@ mpmath==1.3.0 nest-asyncio==1.6.0 numpy==2.2.4 onnxruntime-genai-winml==0.12.1 -./onnxruntime_windowsml-1.24.4.202603181718-cp312-cp312-win_amd64.whl +onnxruntime-windowsml==1.24.4.202603181718 packaging==24.2 parso==0.8.5 platformdirs==4.4.0 @@ -40,11 +40,11 @@ stack-data==0.6.3 sympy==1.14.0 tornado==6.5.5 traitlets==5.14.3 +wcwidth==0.2.13 +widgetsnbextension==4.0.13 # uvpip:uninstall wasdk-Microsoft.Windows.AI.MachineLearning;pre # uvpip:uninstall wasdk-Microsoft.Windows.ApplicationModel.DynamicDependency.Bootstrap;pre windowsml==2.0.297rc0 -wcwidth==0.2.13 -widgetsnbextension==4.0.13 # winrt-runtime==3.2.1 winrt-runtime==3.2.1 # winrt-Windows.Foundation==3.2.1 diff --git a/.aitk/requirements/requirements-WCR.txt b/.aitk/requirements/requirements-WCR.txt index 29af978aa..37b625e44 100644 --- a/.aitk/requirements/requirements-WCR.txt +++ b/.aitk/requirements/requirements-WCR.txt @@ -1,4 +1,3 @@ -./onnxruntime_windowsml-1.24.4.202603181718-cp312-cp312-win_amd64.whl aiohappyeyeballs==2.6.1 aiohttp==3.13.4 aiosignal==1.4.0 @@ -60,6 +59,7 @@ olive-ai==0.10.1 onnx==1.17.0 onnx-ir==0.1.10 onnxruntime-genai-winml==0.12.1 +onnxruntime-windowsml==1.24.4.202603181718 onnxscript==0.5.3 # optimum==1.26.1 optimum==1.26.1 diff --git a/.aitk/requirements/requirements-WCR_CUDA.txt b/.aitk/requirements/requirements-WCR_CUDA.txt index 43a1f39e7..96ef8fcce 100644 --- a/.aitk/requirements/requirements-WCR_CUDA.txt +++ b/.aitk/requirements/requirements-WCR_CUDA.txt @@ -1,5 +1,4 @@ --extra-index-url https://download.pytorch.org/whl/cu128 -./onnxruntime_windowsml-1.24.4.202603181718-cp312-cp312-win_amd64.whl aiohappyeyeballs==2.6.1 aiohttp==3.13.4 aiosignal==1.4.0 @@ -61,6 +60,7 @@ olive-ai==0.10.1 onnx==1.17.0 onnx-ir==0.1.10 onnxruntime-genai-winml==0.12.1 +onnxruntime-windowsml==1.24.4.202603181718 onnxscript==0.5.3 # optimum==1.26.1 optimum==1.26.1 diff --git a/.aitk/requirements/requirements-WCR_INIT.txt b/.aitk/requirements/requirements-WCR_INIT.txt index ba14bab25..205b46ddb 100644 --- a/.aitk/requirements/requirements-WCR_INIT.txt +++ b/.aitk/requirements/requirements-WCR_INIT.txt @@ -3,7 +3,7 @@ flatbuffers==25.2.10 humanfriendly==10.0 mpmath==1.3.0 numpy==2.2.4 -./onnxruntime_windowsml-1.24.4.202603181718-cp312-cp312-win_amd64.whl +onnxruntime-windowsml==1.24.4.202603181718 packaging==24.2 protobuf==5.29.6 pyreadline3==3.5.4 From 885b2d18613258ba0eb1d3a9e7bc6a3789b4c01e Mon Sep 17 00:00:00 2001 From: hualxie Date: Mon, 20 Apr 2026 11:45:39 +0800 Subject: [PATCH 05/12] format --- .aitk/requirements/requirements-Profiling.txt | 1 + .aitk/requirements/requirements-QNN_LLM.txt | 13 +++++-------- .aitk/requirements/requirements-WCR.txt | 8 +++++--- .aitk/requirements/requirements-WCR_CUDA.txt | 13 +++++-------- .aitk/requirements/requirements-WCR_INIT.txt | 4 +++- 5 files changed, 19 insertions(+), 20 deletions(-) diff --git a/.aitk/requirements/requirements-Profiling.txt b/.aitk/requirements/requirements-Profiling.txt index fed09f3ca..6fc33dff1 100644 --- a/.aitk/requirements/requirements-Profiling.txt +++ b/.aitk/requirements/requirements-Profiling.txt @@ -41,6 +41,7 @@ traitlets==5.14.3 # uvpip:uninstall wasdk-Microsoft.Windows.AI.MachineLearning;pre # uvpip:uninstall wasdk-Microsoft.Windows.ApplicationModel.DynamicDependency.Bootstrap;pre wcwidth==0.2.13 +windowsml==2.0.297rc0 # uvpip:uninstall winrt-runtime;pre # uvpip:uninstall winrt-Windows.Foundation;pre # uvpip:uninstall winrt-Windows.Foundation.Collections;pre diff --git a/.aitk/requirements/requirements-QNN_LLM.txt b/.aitk/requirements/requirements-QNN_LLM.txt index be768f4f6..48be3edae 100644 --- a/.aitk/requirements/requirements-QNN_LLM.txt +++ b/.aitk/requirements/requirements-QNN_LLM.txt @@ -40,15 +40,12 @@ stack-data==0.6.3 sympy==1.14.0 tornado==6.5.5 traitlets==5.14.3 -wcwidth==0.2.13 -widgetsnbextension==4.0.13 # uvpip:uninstall wasdk-Microsoft.Windows.AI.MachineLearning;pre # uvpip:uninstall wasdk-Microsoft.Windows.ApplicationModel.DynamicDependency.Bootstrap;pre +wcwidth==0.2.13 +widgetsnbextension==4.0.13 windowsml==2.0.297rc0 -# winrt-runtime==3.2.1 -winrt-runtime==3.2.1 -# winrt-Windows.Foundation==3.2.1 -winrt-Windows.Foundation==3.2.1 -# winrt-Windows.Foundation.Collections==3.2.1 -winrt-Windows.Foundation.Collections==3.2.1 +# uvpip:uninstall winrt-runtime;pre +# uvpip:uninstall winrt-Windows.Foundation;pre +# uvpip:uninstall winrt-Windows.Foundation.Collections;pre # not in requires diff --git a/.aitk/requirements/requirements-WCR.txt b/.aitk/requirements/requirements-WCR.txt index 37b625e44..cd0507d52 100644 --- a/.aitk/requirements/requirements-WCR.txt +++ b/.aitk/requirements/requirements-WCR.txt @@ -111,11 +111,13 @@ typing-extensions==4.15.0 typing-inspection==0.4.1 tzdata==2025.2 urllib3==2.6.3 -wcwidth==0.2.13 -widgetsnbextension==4.0.13 # uvpip:uninstall wasdk-Microsoft.Windows.AI.MachineLearning;pre # uvpip:uninstall wasdk-Microsoft.Windows.ApplicationModel.DynamicDependency.Bootstrap;pre +wcwidth==0.2.13 +widgetsnbextension==4.0.13 windowsml==2.0.297rc0 -# uvpip:uninstall winrt-runtime winrt-Windows.Foundation winrt-Windows.Foundation.Collections;pre +# uvpip:uninstall winrt-runtime;pre +# uvpip:uninstall winrt-Windows.Foundation;pre +# uvpip:uninstall winrt-Windows.Foundation.Collections;pre xxhash==3.5.0 yarl==1.20.1 diff --git a/.aitk/requirements/requirements-WCR_CUDA.txt b/.aitk/requirements/requirements-WCR_CUDA.txt index 96ef8fcce..1aee26dd8 100644 --- a/.aitk/requirements/requirements-WCR_CUDA.txt +++ b/.aitk/requirements/requirements-WCR_CUDA.txt @@ -113,16 +113,13 @@ typing-extensions==4.15.0 typing-inspection==0.4.1 tzdata==2025.2 urllib3==2.6.3 -wcwidth==0.2.13 -widgetsnbextension==4.0.13 # uvpip:uninstall wasdk-Microsoft.Windows.AI.MachineLearning;pre # uvpip:uninstall wasdk-Microsoft.Windows.ApplicationModel.DynamicDependency.Bootstrap;pre +wcwidth==0.2.13 +widgetsnbextension==4.0.13 windowsml==2.0.297rc0 -# winrt-runtime==3.2.1 -winrt-runtime==3.2.1 -# winrt-Windows.Foundation==3.2.1 -winrt-Windows.Foundation==3.2.1 -# winrt-Windows.Foundation.Collections==3.2.1 -winrt-Windows.Foundation.Collections==3.2.1 +# uvpip:uninstall winrt-runtime;pre +# uvpip:uninstall winrt-Windows.Foundation;pre +# uvpip:uninstall winrt-Windows.Foundation.Collections;pre xxhash==3.5.0 yarl==1.20.1 diff --git a/.aitk/requirements/requirements-WCR_INIT.txt b/.aitk/requirements/requirements-WCR_INIT.txt index 205b46ddb..88e45e977 100644 --- a/.aitk/requirements/requirements-WCR_INIT.txt +++ b/.aitk/requirements/requirements-WCR_INIT.txt @@ -11,5 +11,7 @@ sympy==1.14.0 # uvpip:uninstall wasdk-Microsoft.Windows.AI.MachineLearning;pre # uvpip:uninstall wasdk-Microsoft.Windows.ApplicationModel.DynamicDependency.Bootstrap;pre windowsml==2.0.297rc0 -# uvpip:uninstall winrt-runtime winrt-Windows.Foundation winrt-Windows.Foundation.Collections;pre +# uvpip:uninstall winrt-runtime;pre +# uvpip:uninstall winrt-Windows.Foundation;pre +# uvpip:uninstall winrt-Windows.Foundation.Collections;pre # not in requires From b8ae7cd14750d0725a67daa3e483256b2f5a63d4 Mon Sep 17 00:00:00 2001 From: hualxie Date: Fri, 24 Apr 2026 11:43:57 +0800 Subject: [PATCH 06/12] add bump model versions --- .aitk/configs/checks.json | 2 +- .aitk/requirements/requirements-Profiling.txt | 2 +- .aitk/requirements/requirements-QNN_LLM.txt | 2 +- .aitk/requirements/requirements-WCR.txt | 2 +- .aitk/requirements/requirements-WCR_CUDA.txt | 2 +- .aitk/scripts/bump_model_versions.py | 140 ++++++++++++++++++ .aitk/scripts/project_processor.py | 18 +-- .aitk/scripts/sanitize/utils.py | 29 +++- intel-bert-base-uncased-mrpc/aitk/winml.py | 18 +-- microsoft-resnet-50/aitk/_copy.json.config | 4 + 10 files changed, 185 insertions(+), 34 deletions(-) create mode 100644 .aitk/scripts/bump_model_versions.py diff --git a/.aitk/configs/checks.json b/.aitk/configs/checks.json index 3c0d89e7f..ea6fb364a 100644 --- a/.aitk/configs/checks.json +++ b/.aitk/configs/checks.json @@ -1,6 +1,6 @@ { "configCheck": 167, - "copyCheck": 182, + "copyCheck": 183, "extensionCheck": 2, "gitignoreCheck": 44, "inferenceModelCheck": 25, diff --git a/.aitk/requirements/requirements-Profiling.txt b/.aitk/requirements/requirements-Profiling.txt index a4f241248..244a330ea 100644 --- a/.aitk/requirements/requirements-Profiling.txt +++ b/.aitk/requirements/requirements-Profiling.txt @@ -20,7 +20,7 @@ nest-asyncio==1.6.0 numpy==2.2.4 # onnx==1.17.0 onnx==1.17.0 -onnxruntime-genai-winml==0.12.1 +onnxruntime-genai-winml==0.13.1 onnxruntime-windowsml==1.24.4.202603181718 packaging==24.2 pandas==2.2.3 diff --git a/.aitk/requirements/requirements-QNN_LLM.txt b/.aitk/requirements/requirements-QNN_LLM.txt index 48be3edae..37ceab9b1 100644 --- a/.aitk/requirements/requirements-QNN_LLM.txt +++ b/.aitk/requirements/requirements-QNN_LLM.txt @@ -21,7 +21,7 @@ matplotlib-inline==0.1.7 mpmath==1.3.0 nest-asyncio==1.6.0 numpy==2.2.4 -onnxruntime-genai-winml==0.12.1 +onnxruntime-genai-winml==0.13.1 onnxruntime-windowsml==1.24.4.202603181718 packaging==24.2 parso==0.8.5 diff --git a/.aitk/requirements/requirements-WCR.txt b/.aitk/requirements/requirements-WCR.txt index cd0507d52..6dbb0cb90 100644 --- a/.aitk/requirements/requirements-WCR.txt +++ b/.aitk/requirements/requirements-WCR.txt @@ -58,7 +58,7 @@ olive-ai==0.10.1 # onnx==1.17.0 onnx==1.17.0 onnx-ir==0.1.10 -onnxruntime-genai-winml==0.12.1 +onnxruntime-genai-winml==0.13.1 onnxruntime-windowsml==1.24.4.202603181718 onnxscript==0.5.3 # optimum==1.26.1 diff --git a/.aitk/requirements/requirements-WCR_CUDA.txt b/.aitk/requirements/requirements-WCR_CUDA.txt index 1aee26dd8..257734b8a 100644 --- a/.aitk/requirements/requirements-WCR_CUDA.txt +++ b/.aitk/requirements/requirements-WCR_CUDA.txt @@ -59,7 +59,7 @@ olive-ai==0.10.1 # onnx==1.17.0 onnx==1.17.0 onnx-ir==0.1.10 -onnxruntime-genai-winml==0.12.1 +onnxruntime-genai-winml==0.13.1 onnxruntime-windowsml==1.24.4.202603181718 onnxscript==0.5.3 # optimum==1.26.1 diff --git a/.aitk/scripts/bump_model_versions.py b/.aitk/scripts/bump_model_versions.py new file mode 100644 index 000000000..6297d8d9a --- /dev/null +++ b/.aitk/scripts/bump_model_versions.py @@ -0,0 +1,140 @@ +import argparse +import re +import sys +from pathlib import Path +from typing import Optional + +from sanitize.utils import iter_aitk_info_yml + + +VERSION_LINE_RE = re.compile(r"^(?P\s*)version:\s*(?P\d+)\s*(?P#.*)?$") + + +def find_version_line(lines: list[str], version_value: int) -> Optional[int]: + """Return the index of the `version:` line under top-level `aitk.modelInfo`. + + Only the top-level `aitk:` key (indent 0) is considered — recipe entries + can contain their own nested `aitk:` blocks for per-recipe overrides. + """ + in_aitk = False + modelInfo_indent: Optional[int] = None + for idx, line in enumerate(lines): + stripped = line.lstrip() + if not stripped or stripped.startswith("#"): + continue + indent = len(line) - len(stripped) + + if not in_aitk: + if indent == 0 and stripped.startswith("aitk:"): + in_aitk = True + continue + + # Left the top-level aitk: block. + if indent == 0: + return None + + if modelInfo_indent is None: + if stripped.startswith("modelInfo:"): + modelInfo_indent = indent + continue + + if indent <= modelInfo_indent: + # Left modelInfo: but still inside aitk: — keep scanning in case + # version lives in a different subkey shape, though that's unusual. + modelInfo_indent = None + continue + + m = VERSION_LINE_RE.match(line.rstrip("\n")) + if m and int(m.group("value")) == version_value: + return idx + return None + + +def bump_file(yml_file: Path, yaml_object: dict, delta: int, dry_run: bool) -> Optional[tuple[int, int]]: + """Bump the aitk.modelInfo.version in one info.yml. Returns (old, new) or None.""" + modelInfo = yaml_object["aitk"].get("modelInfo") + if not isinstance(modelInfo, dict) or "version" not in modelInfo: + return None + old = modelInfo["version"] + if not isinstance(old, int): + print(f"Skip {yml_file}: version is not an integer ({old!r})") + return None + new = old + delta + if new < 1: + print(f"Skip {yml_file}: version {old} + delta {delta:+d} would be < 1") + return None + + with yml_file.open("r", encoding="utf-8", newline="") as f: + text = f.read() + lines = text.splitlines(keepends=True) + idx = find_version_line(lines, old) + if idx is None: + print(f"Skip {yml_file}: could not locate 'version: {old}' line under aitk.modelInfo") + return None + m = VERSION_LINE_RE.match(lines[idx].rstrip("\n")) + newline = lines[idx][len(lines[idx].rstrip("\r\n")):] or "\n" + indent = m.group("indent") + comment = m.group("comment") + rebuilt = f"{indent}version: {new}" + if comment: + rebuilt += f" {comment}" + rebuilt += newline + lines[idx] = rebuilt + + if not dry_run: + with yml_file.open("w", encoding="utf-8", newline="") as f: + f.writelines(lines) + return old, new + + +def main(): + parser = argparse.ArgumentParser( + description="Batch increase or decrease aitk.modelInfo.version across all info.yml files." + ) + parser.add_argument( + "delta", + type=int, + help="Integer delta to apply (e.g. +1, -1, 2). Must not reduce any version below 1.", + ) + parser.add_argument( + "--filter", + dest="filter", + default=None, + help="Optional substring; only info.yml files whose modelInfo.id contains this string are updated.", + ) + parser.add_argument( + "--dry-run", + action="store_true", + help="Show what would change without writing files.", + ) + args = parser.parse_args() + + if args.delta == 0: + parser.error("delta must be non-zero") + + root_dir = Path(__file__).parent.parent.parent + changed = 0 + scanned = 0 + for yml_file, yaml_object in iter_aitk_info_yml(root_dir): + scanned += 1 + if args.filter: + mid = yaml_object["aitk"].get("modelInfo", {}).get("id", "") + if args.filter not in mid: + continue + + result = bump_file(yml_file, yaml_object, args.delta, args.dry_run) + if result is None: + continue + old, new = result + changed += 1 + rel = yml_file.relative_to(root_dir) + tag = "[dry-run] " if args.dry_run else "" + print(f"{tag}{rel}: version {old} -> {new}") + + action = "Would update" if args.dry_run else "Updated" + print(f"\n{action} {changed} info.yml file(s) with aitk block (delta {args.delta:+d}).") + return 0 + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/.aitk/scripts/project_processor.py b/.aitk/scripts/project_processor.py index 74c2c66f8..2ae16a879 100644 --- a/.aitk/scripts/project_processor.py +++ b/.aitk/scripts/project_processor.py @@ -4,7 +4,6 @@ from pathlib import Path from typing import Dict, List, Optional -import yaml from model_lab import RuntimeEnum from sanitize.constants import ArchitectureEnum, EPNames, IconEnum, ModelStatusEnum from sanitize.copy_config import CopyConfig @@ -15,7 +14,7 @@ from sanitize.generator_trtrtx import generator_trtrtx from sanitize.model_info import ModelInfo, ModelList from sanitize.project_config import ModelInfoProject, ModelProjectConfig, WorkflowItem -from sanitize.utils import GlobalVars, isLLM_by_id, open_ex +from sanitize.utils import GlobalVars, isLLM_by_id, iter_aitk_info_yml, open_ex def fetch_pipeline_tags(model_link: str) -> Optional[List[str]]: """Fetch pipeline_tag from HuggingFace API for a given model link. @@ -209,22 +208,9 @@ def project_processor(): all_ids = set() all_summary = AllModelSummary() - for yml_file in root_dir.rglob("info.yml"): + for yml_file, yaml_object in iter_aitk_info_yml(root_dir): # if "DEBUG_ID" in str(yml_file): # pass - # read yml file as yaml object - with yml_file.open("r", encoding="utf-8") as file: - try: - yaml_content = file.read() - yaml_object = yaml.safe_load(yaml_content) - except yaml.YAMLError as e: - print(f"Error reading {yml_file}: {e}") - continue - aitk = yaml_object.get("aitk", []) - if not aitk: - if yml_file.parent.name == "aitk": - raise KeyError(f"aitk not found in {yml_file}") - continue print(f"Process aitk for {yml_file}") # model info modelInfo = convert_yaml_to_model_info(root_dir, yml_file, yaml_object) diff --git a/.aitk/scripts/sanitize/utils.py b/.aitk/scripts/sanitize/utils.py index 4be4971b1..6d96fc5fa 100644 --- a/.aitk/scripts/sanitize/utils.py +++ b/.aitk/scripts/sanitize/utils.py @@ -6,14 +6,41 @@ import json import os from contextlib import contextmanager -from typing import Any +from pathlib import Path +from typing import Any, Iterator, Tuple import pydash +import yaml from model_lab import RuntimeEnum from .constants import EPNames, OliveDeviceTypes, OlivePropertyNames +def iter_aitk_info_yml(root_dir: Path) -> Iterator[Tuple[Path, dict]]: + """Yield (yml_file, yaml_object) for each info.yml under root_dir that has + a top-level `aitk` key. + + Files that fail to parse are skipped with a printed warning. An info.yml + sitting under a folder literally named `aitk` but missing the `aitk` key + raises KeyError, matching the invariant enforced by project_processor. + """ + for yml_file in root_dir.rglob("info.yml"): + try: + with yml_file.open("r", encoding="utf-8") as f: + yaml_object = yaml.safe_load(f.read()) + except yaml.YAMLError as e: + print(f"Error reading {yml_file}: {e}") + continue + if not isinstance(yaml_object, dict): + continue + aitk = yaml_object.get("aitk") + if not aitk: + if yml_file.parent.name == "aitk": + raise KeyError(f"aitk not found in {yml_file}") + continue + yield yml_file, yaml_object + + class GlobalVars: errorList = [] verbose = False diff --git a/intel-bert-base-uncased-mrpc/aitk/winml.py b/intel-bert-base-uncased-mrpc/aitk/winml.py index 74a12c53a..febad5a30 100644 --- a/intel-bert-base-uncased-mrpc/aitk/winml.py +++ b/intel-bert-base-uncased-mrpc/aitk/winml.py @@ -1,19 +1,13 @@ import json def _get_ep_paths() -> dict[str, str]: - from winui3.microsoft.windows.applicationmodel.dynamicdependency.bootstrap import ( - InitializeOptions, - initialize - ) - import winui3.microsoft.windows.ai.machinelearning as winml + from windowsml import EpCatalog eps = {} - with initialize(options = InitializeOptions.ON_NO_MATCH_SHOW_UI): - catalog = winml.ExecutionProviderCatalog.get_default() - providers = catalog.find_all_providers() - for provider in providers: - provider.ensure_ready_async().get() - eps[provider.name] = provider.library_path - # DO NOT call provider.try_register in python. That will register to the native env. + with EpCatalog() as catalog: + for ep in catalog.find_all_providers(): + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + eps[ep.name] = ep.library_path return eps if __name__ == "__main__": diff --git a/microsoft-resnet-50/aitk/_copy.json.config b/microsoft-resnet-50/aitk/_copy.json.config index 45a3f1ca7..cf4f19fc1 100644 --- a/microsoft-resnet-50/aitk/_copy.json.config +++ b/microsoft-resnet-50/aitk/_copy.json.config @@ -1,5 +1,9 @@ { "copies": [ + { + "src": "../../intel-bert-base-uncased-mrpc/aitk/winml.py", + "dst": "winml.py" + }, { "src": "resnet_qdq_amd.json.config", "dst": "resnet_qdq_qnn.json.config", From e9f92f3bad92cbd89489ea91a668ffda96d2b87e Mon Sep 17 00:00:00 2001 From: hualxie Date: Fri, 24 Apr 2026 12:04:33 +0800 Subject: [PATCH 07/12] update winml.py --- .aitk/configs/checks.json | 5 +++-- .aitk/scripts/sanitize/main.py | 18 ++++++++++++++++++ .aitk/scripts/sanitize/utils.py | 1 + .../aitk/_copy.json.config | 8 ++++++++ .../aitk/winml.py | 18 ++++++------------ Qwen-Qwen2.5-0.5B-Instruct/aitk/winml.py | 18 ++++++------------ Qwen-Qwen2.5-0.5B/aitk/winml.py | 18 ++++++------------ Qwen-Qwen2.5-1.5B-Instruct/aitk/winml.py | 18 ++++++------------ Qwen-Qwen2.5-14B-Instruct/aitk/winml.py | 18 ++++++------------ Qwen-Qwen2.5-3B-Instruct/aitk/winml.py | 18 ++++++------------ Qwen-Qwen2.5-7B-Instruct/aitk/winml.py | 18 ++++++------------ Qwen-Qwen2.5-Coder-0.5B-Instruct/aitk/winml.py | 18 ++++++------------ Qwen-Qwen2.5-Coder-1.5B-Instruct/aitk/winml.py | 18 ++++++------------ Qwen-Qwen2.5-Coder-14B-Instruct/aitk/winml.py | 18 ++++++------------ Qwen-Qwen2.5-Coder-3B-Instruct/aitk/winml.py | 18 ++++++------------ Qwen-Qwen2.5-Coder-7B-Instruct/aitk/winml.py | 18 ++++++------------ .../aitk/winml.py | 18 ++++++------------ .../aitk/winml.py | 18 ++++++------------ .../aitk/winml.py | 18 ++++++------------ .../aitk/winml.py | 18 ++++++------------ .../aitk/winml.py | 18 ++++++------------ google-vit-base-patch16-224/aitk/winml.py | 18 ++++++------------ .../aitk/winml.py | 18 ++++++------------ meta-llama-Llama-3.1-8B-Instruct/aitk/winml.py | 18 ++++++------------ meta-llama-Llama-3.2-1B-Instruct/aitk/winml.py | 18 ++++++------------ .../aitk/winml.py | 18 ++++++------------ microsoft-Phi-3-mini-4k-instruct/aitk/winml.py | 18 ++++++------------ microsoft-Phi-3.5-mini-instruct/aitk/winml.py | 18 ++++++------------ microsoft-Phi-4-mini-instruct/aitk/winml.py | 18 ++++++------------ microsoft-Phi-4-mini-reasoning/aitk/winml.py | 18 ++++++------------ microsoft-Phi-4-reasoning-plus/aitk/winml.py | 18 ++++++------------ microsoft-Phi-4-reasoning/aitk/winml.py | 18 ++++++------------ microsoft-Phi-4/aitk/winml.py | 18 ++++++------------ microsoft-resnet-50/aitk/winml.py | 18 ++++++------------ .../aitk/winml.py | 18 ++++++------------ .../aitk/winml.py | 18 ++++++------------ openai-clip-vit-base-patch16/aitk/winml.py | 18 ++++++------------ openai-clip-vit-base-patch32/aitk/winml.py | 18 ++++++------------ openai-clip-vit-large-patch14/aitk/winml.py | 18 ++++++------------ openai-whisper-large-v3-turbo/aitk/winml.py | 18 ++++++------------ sam-vit-base/aitk/winml.py | 18 ++++++------------ sam2.1-hiera-small/aitk/winml.py | 18 ++++++------------ sd-legacy-stable-diffusion-v1-5/aitk/winml.py | 18 ++++++------------ .../aitk/winml.py | 18 ++++++------------ 44 files changed, 270 insertions(+), 482 deletions(-) create mode 100644 OFA-Sys-chinese-clip-vit-base-patch16/aitk/_copy.json.config diff --git a/.aitk/configs/checks.json b/.aitk/configs/checks.json index ea6fb364a..1f82a30a0 100644 --- a/.aitk/configs/checks.json +++ b/.aitk/configs/checks.json @@ -1,6 +1,6 @@ { "configCheck": 167, - "copyCheck": 183, + "copyCheck": 184, "extensionCheck": 2, "gitignoreCheck": 44, "inferenceModelCheck": 25, @@ -12,5 +12,6 @@ "pathCheck": 1423, "requirementsCheck": 37, "templateCheck": 3, - "venvRequirementsCheck": 17 + "venvRequirementsCheck": 17, + "winmlCopyCheck": 40 } diff --git a/.aitk/scripts/sanitize/main.py b/.aitk/scripts/sanitize/main.py index f3cb4f71b..c05d5d50e 100644 --- a/.aitk/scripts/sanitize/main.py +++ b/.aitk/scripts/sanitize/main.py @@ -20,6 +20,12 @@ from .project_config import ModelInfoProject, ModelProjectConfig from .utils import GlobalVars, open_ex, printError, printWarning +# Projects exempt from the "_copy.json.config must copy winml.py" rule. +# Typically contains the canonical source of winml.py that others copy from. +WINML_COPY_EXEMPT_IDS = { + "huggingface/Intel/bert-base-uncased-mrpc", +} + def shouldCheckModel(rootDir: str, configDir: str, model: ModelInfo) -> str | None: modelDir = os.path.join(rootDir, model.relativePath) if model.relativePath else os.path.join(configDir, model.id) @@ -65,11 +71,23 @@ def main(): # process copy copyConfigFile = os.path.join(modelVerDir, "_copy.json.config") + copyConfig: CopyConfig | None = None if os.path.exists(copyConfigFile): copyConfig = CopyConfig.Read(copyConfigFile) copyConfig.process(modelVerDir, pre=False) copyConfig.writeIfChanged() + # Every non-template, non-extension project must have a _copy.json.config + # with a copy entry for winml.py (so winml.py stays in sync with the canonical + # source at intel-bert-base-uncased-mrpc). Exempt list: WINML_COPY_EXEMPT_IDS. + if not model.template and not model.extension and model.id not in WINML_COPY_EXEMPT_IDS: + if copyConfig is None: + printError(f"{copyConfigFile} not exists (required to copy winml.py)") + elif not any(c.dst == "winml.py" for c in copyConfig.copies): + printError(f"{copyConfigFile} missing a copy entry with dst 'winml.py'") + else: + GlobalVars.winmlCopyCheck += 1 + # check LICENSE if not model.extension and not model.template: licenseFile = os.path.join(modelVerDir, "..", "LICENSE") diff --git a/.aitk/scripts/sanitize/utils.py b/.aitk/scripts/sanitize/utils.py index 6d96fc5fa..032aa826b 100644 --- a/.aitk/scripts/sanitize/utils.py +++ b/.aitk/scripts/sanitize/utils.py @@ -61,6 +61,7 @@ class GlobalVars: copyCheck = 0 licenseCheck = 0 venvRequirementsCheck = set() + winmlCopyCheck = 0 oliveCheck = 0 RuntimeToEPName = { diff --git a/OFA-Sys-chinese-clip-vit-base-patch16/aitk/_copy.json.config b/OFA-Sys-chinese-clip-vit-base-patch16/aitk/_copy.json.config new file mode 100644 index 000000000..6fd21fb1d --- /dev/null +++ b/OFA-Sys-chinese-clip-vit-base-patch16/aitk/_copy.json.config @@ -0,0 +1,8 @@ +{ + "copies": [ + { + "src": "../../intel-bert-base-uncased-mrpc/aitk/winml.py", + "dst": "winml.py" + } + ] +} diff --git a/OFA-Sys-chinese-clip-vit-base-patch16/aitk/winml.py b/OFA-Sys-chinese-clip-vit-base-patch16/aitk/winml.py index 74a12c53a..febad5a30 100644 --- a/OFA-Sys-chinese-clip-vit-base-patch16/aitk/winml.py +++ b/OFA-Sys-chinese-clip-vit-base-patch16/aitk/winml.py @@ -1,19 +1,13 @@ import json def _get_ep_paths() -> dict[str, str]: - from winui3.microsoft.windows.applicationmodel.dynamicdependency.bootstrap import ( - InitializeOptions, - initialize - ) - import winui3.microsoft.windows.ai.machinelearning as winml + from windowsml import EpCatalog eps = {} - with initialize(options = InitializeOptions.ON_NO_MATCH_SHOW_UI): - catalog = winml.ExecutionProviderCatalog.get_default() - providers = catalog.find_all_providers() - for provider in providers: - provider.ensure_ready_async().get() - eps[provider.name] = provider.library_path - # DO NOT call provider.try_register in python. That will register to the native env. + with EpCatalog() as catalog: + for ep in catalog.find_all_providers(): + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + eps[ep.name] = ep.library_path return eps if __name__ == "__main__": diff --git a/Qwen-Qwen2.5-0.5B-Instruct/aitk/winml.py b/Qwen-Qwen2.5-0.5B-Instruct/aitk/winml.py index 74a12c53a..febad5a30 100644 --- a/Qwen-Qwen2.5-0.5B-Instruct/aitk/winml.py +++ b/Qwen-Qwen2.5-0.5B-Instruct/aitk/winml.py @@ -1,19 +1,13 @@ import json def _get_ep_paths() -> dict[str, str]: - from winui3.microsoft.windows.applicationmodel.dynamicdependency.bootstrap import ( - InitializeOptions, - initialize - ) - import winui3.microsoft.windows.ai.machinelearning as winml + from windowsml import EpCatalog eps = {} - with initialize(options = InitializeOptions.ON_NO_MATCH_SHOW_UI): - catalog = winml.ExecutionProviderCatalog.get_default() - providers = catalog.find_all_providers() - for provider in providers: - provider.ensure_ready_async().get() - eps[provider.name] = provider.library_path - # DO NOT call provider.try_register in python. That will register to the native env. + with EpCatalog() as catalog: + for ep in catalog.find_all_providers(): + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + eps[ep.name] = ep.library_path return eps if __name__ == "__main__": diff --git a/Qwen-Qwen2.5-0.5B/aitk/winml.py b/Qwen-Qwen2.5-0.5B/aitk/winml.py index 74a12c53a..febad5a30 100644 --- a/Qwen-Qwen2.5-0.5B/aitk/winml.py +++ b/Qwen-Qwen2.5-0.5B/aitk/winml.py @@ -1,19 +1,13 @@ import json def _get_ep_paths() -> dict[str, str]: - from winui3.microsoft.windows.applicationmodel.dynamicdependency.bootstrap import ( - InitializeOptions, - initialize - ) - import winui3.microsoft.windows.ai.machinelearning as winml + from windowsml import EpCatalog eps = {} - with initialize(options = InitializeOptions.ON_NO_MATCH_SHOW_UI): - catalog = winml.ExecutionProviderCatalog.get_default() - providers = catalog.find_all_providers() - for provider in providers: - provider.ensure_ready_async().get() - eps[provider.name] = provider.library_path - # DO NOT call provider.try_register in python. That will register to the native env. + with EpCatalog() as catalog: + for ep in catalog.find_all_providers(): + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + eps[ep.name] = ep.library_path return eps if __name__ == "__main__": diff --git a/Qwen-Qwen2.5-1.5B-Instruct/aitk/winml.py b/Qwen-Qwen2.5-1.5B-Instruct/aitk/winml.py index 74a12c53a..febad5a30 100644 --- a/Qwen-Qwen2.5-1.5B-Instruct/aitk/winml.py +++ b/Qwen-Qwen2.5-1.5B-Instruct/aitk/winml.py @@ -1,19 +1,13 @@ import json def _get_ep_paths() -> dict[str, str]: - from winui3.microsoft.windows.applicationmodel.dynamicdependency.bootstrap import ( - InitializeOptions, - initialize - ) - import winui3.microsoft.windows.ai.machinelearning as winml + from windowsml import EpCatalog eps = {} - with initialize(options = InitializeOptions.ON_NO_MATCH_SHOW_UI): - catalog = winml.ExecutionProviderCatalog.get_default() - providers = catalog.find_all_providers() - for provider in providers: - provider.ensure_ready_async().get() - eps[provider.name] = provider.library_path - # DO NOT call provider.try_register in python. That will register to the native env. + with EpCatalog() as catalog: + for ep in catalog.find_all_providers(): + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + eps[ep.name] = ep.library_path return eps if __name__ == "__main__": diff --git a/Qwen-Qwen2.5-14B-Instruct/aitk/winml.py b/Qwen-Qwen2.5-14B-Instruct/aitk/winml.py index 74a12c53a..febad5a30 100644 --- a/Qwen-Qwen2.5-14B-Instruct/aitk/winml.py +++ b/Qwen-Qwen2.5-14B-Instruct/aitk/winml.py @@ -1,19 +1,13 @@ import json def _get_ep_paths() -> dict[str, str]: - from winui3.microsoft.windows.applicationmodel.dynamicdependency.bootstrap import ( - InitializeOptions, - initialize - ) - import winui3.microsoft.windows.ai.machinelearning as winml + from windowsml import EpCatalog eps = {} - with initialize(options = InitializeOptions.ON_NO_MATCH_SHOW_UI): - catalog = winml.ExecutionProviderCatalog.get_default() - providers = catalog.find_all_providers() - for provider in providers: - provider.ensure_ready_async().get() - eps[provider.name] = provider.library_path - # DO NOT call provider.try_register in python. That will register to the native env. + with EpCatalog() as catalog: + for ep in catalog.find_all_providers(): + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + eps[ep.name] = ep.library_path return eps if __name__ == "__main__": diff --git a/Qwen-Qwen2.5-3B-Instruct/aitk/winml.py b/Qwen-Qwen2.5-3B-Instruct/aitk/winml.py index 74a12c53a..febad5a30 100644 --- a/Qwen-Qwen2.5-3B-Instruct/aitk/winml.py +++ b/Qwen-Qwen2.5-3B-Instruct/aitk/winml.py @@ -1,19 +1,13 @@ import json def _get_ep_paths() -> dict[str, str]: - from winui3.microsoft.windows.applicationmodel.dynamicdependency.bootstrap import ( - InitializeOptions, - initialize - ) - import winui3.microsoft.windows.ai.machinelearning as winml + from windowsml import EpCatalog eps = {} - with initialize(options = InitializeOptions.ON_NO_MATCH_SHOW_UI): - catalog = winml.ExecutionProviderCatalog.get_default() - providers = catalog.find_all_providers() - for provider in providers: - provider.ensure_ready_async().get() - eps[provider.name] = provider.library_path - # DO NOT call provider.try_register in python. That will register to the native env. + with EpCatalog() as catalog: + for ep in catalog.find_all_providers(): + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + eps[ep.name] = ep.library_path return eps if __name__ == "__main__": diff --git a/Qwen-Qwen2.5-7B-Instruct/aitk/winml.py b/Qwen-Qwen2.5-7B-Instruct/aitk/winml.py index 74a12c53a..febad5a30 100644 --- a/Qwen-Qwen2.5-7B-Instruct/aitk/winml.py +++ b/Qwen-Qwen2.5-7B-Instruct/aitk/winml.py @@ -1,19 +1,13 @@ import json def _get_ep_paths() -> dict[str, str]: - from winui3.microsoft.windows.applicationmodel.dynamicdependency.bootstrap import ( - InitializeOptions, - initialize - ) - import winui3.microsoft.windows.ai.machinelearning as winml + from windowsml import EpCatalog eps = {} - with initialize(options = InitializeOptions.ON_NO_MATCH_SHOW_UI): - catalog = winml.ExecutionProviderCatalog.get_default() - providers = catalog.find_all_providers() - for provider in providers: - provider.ensure_ready_async().get() - eps[provider.name] = provider.library_path - # DO NOT call provider.try_register in python. That will register to the native env. + with EpCatalog() as catalog: + for ep in catalog.find_all_providers(): + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + eps[ep.name] = ep.library_path return eps if __name__ == "__main__": diff --git a/Qwen-Qwen2.5-Coder-0.5B-Instruct/aitk/winml.py b/Qwen-Qwen2.5-Coder-0.5B-Instruct/aitk/winml.py index 74a12c53a..febad5a30 100644 --- a/Qwen-Qwen2.5-Coder-0.5B-Instruct/aitk/winml.py +++ b/Qwen-Qwen2.5-Coder-0.5B-Instruct/aitk/winml.py @@ -1,19 +1,13 @@ import json def _get_ep_paths() -> dict[str, str]: - from winui3.microsoft.windows.applicationmodel.dynamicdependency.bootstrap import ( - InitializeOptions, - initialize - ) - import winui3.microsoft.windows.ai.machinelearning as winml + from windowsml import EpCatalog eps = {} - with initialize(options = InitializeOptions.ON_NO_MATCH_SHOW_UI): - catalog = winml.ExecutionProviderCatalog.get_default() - providers = catalog.find_all_providers() - for provider in providers: - provider.ensure_ready_async().get() - eps[provider.name] = provider.library_path - # DO NOT call provider.try_register in python. That will register to the native env. + with EpCatalog() as catalog: + for ep in catalog.find_all_providers(): + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + eps[ep.name] = ep.library_path return eps if __name__ == "__main__": diff --git a/Qwen-Qwen2.5-Coder-1.5B-Instruct/aitk/winml.py b/Qwen-Qwen2.5-Coder-1.5B-Instruct/aitk/winml.py index 74a12c53a..febad5a30 100644 --- a/Qwen-Qwen2.5-Coder-1.5B-Instruct/aitk/winml.py +++ b/Qwen-Qwen2.5-Coder-1.5B-Instruct/aitk/winml.py @@ -1,19 +1,13 @@ import json def _get_ep_paths() -> dict[str, str]: - from winui3.microsoft.windows.applicationmodel.dynamicdependency.bootstrap import ( - InitializeOptions, - initialize - ) - import winui3.microsoft.windows.ai.machinelearning as winml + from windowsml import EpCatalog eps = {} - with initialize(options = InitializeOptions.ON_NO_MATCH_SHOW_UI): - catalog = winml.ExecutionProviderCatalog.get_default() - providers = catalog.find_all_providers() - for provider in providers: - provider.ensure_ready_async().get() - eps[provider.name] = provider.library_path - # DO NOT call provider.try_register in python. That will register to the native env. + with EpCatalog() as catalog: + for ep in catalog.find_all_providers(): + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + eps[ep.name] = ep.library_path return eps if __name__ == "__main__": diff --git a/Qwen-Qwen2.5-Coder-14B-Instruct/aitk/winml.py b/Qwen-Qwen2.5-Coder-14B-Instruct/aitk/winml.py index 74a12c53a..febad5a30 100644 --- a/Qwen-Qwen2.5-Coder-14B-Instruct/aitk/winml.py +++ b/Qwen-Qwen2.5-Coder-14B-Instruct/aitk/winml.py @@ -1,19 +1,13 @@ import json def _get_ep_paths() -> dict[str, str]: - from winui3.microsoft.windows.applicationmodel.dynamicdependency.bootstrap import ( - InitializeOptions, - initialize - ) - import winui3.microsoft.windows.ai.machinelearning as winml + from windowsml import EpCatalog eps = {} - with initialize(options = InitializeOptions.ON_NO_MATCH_SHOW_UI): - catalog = winml.ExecutionProviderCatalog.get_default() - providers = catalog.find_all_providers() - for provider in providers: - provider.ensure_ready_async().get() - eps[provider.name] = provider.library_path - # DO NOT call provider.try_register in python. That will register to the native env. + with EpCatalog() as catalog: + for ep in catalog.find_all_providers(): + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + eps[ep.name] = ep.library_path return eps if __name__ == "__main__": diff --git a/Qwen-Qwen2.5-Coder-3B-Instruct/aitk/winml.py b/Qwen-Qwen2.5-Coder-3B-Instruct/aitk/winml.py index 74a12c53a..febad5a30 100644 --- a/Qwen-Qwen2.5-Coder-3B-Instruct/aitk/winml.py +++ b/Qwen-Qwen2.5-Coder-3B-Instruct/aitk/winml.py @@ -1,19 +1,13 @@ import json def _get_ep_paths() -> dict[str, str]: - from winui3.microsoft.windows.applicationmodel.dynamicdependency.bootstrap import ( - InitializeOptions, - initialize - ) - import winui3.microsoft.windows.ai.machinelearning as winml + from windowsml import EpCatalog eps = {} - with initialize(options = InitializeOptions.ON_NO_MATCH_SHOW_UI): - catalog = winml.ExecutionProviderCatalog.get_default() - providers = catalog.find_all_providers() - for provider in providers: - provider.ensure_ready_async().get() - eps[provider.name] = provider.library_path - # DO NOT call provider.try_register in python. That will register to the native env. + with EpCatalog() as catalog: + for ep in catalog.find_all_providers(): + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + eps[ep.name] = ep.library_path return eps if __name__ == "__main__": diff --git a/Qwen-Qwen2.5-Coder-7B-Instruct/aitk/winml.py b/Qwen-Qwen2.5-Coder-7B-Instruct/aitk/winml.py index 74a12c53a..febad5a30 100644 --- a/Qwen-Qwen2.5-Coder-7B-Instruct/aitk/winml.py +++ b/Qwen-Qwen2.5-Coder-7B-Instruct/aitk/winml.py @@ -1,19 +1,13 @@ import json def _get_ep_paths() -> dict[str, str]: - from winui3.microsoft.windows.applicationmodel.dynamicdependency.bootstrap import ( - InitializeOptions, - initialize - ) - import winui3.microsoft.windows.ai.machinelearning as winml + from windowsml import EpCatalog eps = {} - with initialize(options = InitializeOptions.ON_NO_MATCH_SHOW_UI): - catalog = winml.ExecutionProviderCatalog.get_default() - providers = catalog.find_all_providers() - for provider in providers: - provider.ensure_ready_async().get() - eps[provider.name] = provider.library_path - # DO NOT call provider.try_register in python. That will register to the native env. + with EpCatalog() as catalog: + for ep in catalog.find_all_providers(): + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + eps[ep.name] = ep.library_path return eps if __name__ == "__main__": diff --git a/deepseek-ai-DeepSeek-R1-Distill-Llama-8B/aitk/winml.py b/deepseek-ai-DeepSeek-R1-Distill-Llama-8B/aitk/winml.py index 74a12c53a..febad5a30 100644 --- a/deepseek-ai-DeepSeek-R1-Distill-Llama-8B/aitk/winml.py +++ b/deepseek-ai-DeepSeek-R1-Distill-Llama-8B/aitk/winml.py @@ -1,19 +1,13 @@ import json def _get_ep_paths() -> dict[str, str]: - from winui3.microsoft.windows.applicationmodel.dynamicdependency.bootstrap import ( - InitializeOptions, - initialize - ) - import winui3.microsoft.windows.ai.machinelearning as winml + from windowsml import EpCatalog eps = {} - with initialize(options = InitializeOptions.ON_NO_MATCH_SHOW_UI): - catalog = winml.ExecutionProviderCatalog.get_default() - providers = catalog.find_all_providers() - for provider in providers: - provider.ensure_ready_async().get() - eps[provider.name] = provider.library_path - # DO NOT call provider.try_register in python. That will register to the native env. + with EpCatalog() as catalog: + for ep in catalog.find_all_providers(): + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + eps[ep.name] = ep.library_path return eps if __name__ == "__main__": diff --git a/deepseek-ai-DeepSeek-R1-Distill-Qwen-1.5B/aitk/winml.py b/deepseek-ai-DeepSeek-R1-Distill-Qwen-1.5B/aitk/winml.py index 74a12c53a..febad5a30 100644 --- a/deepseek-ai-DeepSeek-R1-Distill-Qwen-1.5B/aitk/winml.py +++ b/deepseek-ai-DeepSeek-R1-Distill-Qwen-1.5B/aitk/winml.py @@ -1,19 +1,13 @@ import json def _get_ep_paths() -> dict[str, str]: - from winui3.microsoft.windows.applicationmodel.dynamicdependency.bootstrap import ( - InitializeOptions, - initialize - ) - import winui3.microsoft.windows.ai.machinelearning as winml + from windowsml import EpCatalog eps = {} - with initialize(options = InitializeOptions.ON_NO_MATCH_SHOW_UI): - catalog = winml.ExecutionProviderCatalog.get_default() - providers = catalog.find_all_providers() - for provider in providers: - provider.ensure_ready_async().get() - eps[provider.name] = provider.library_path - # DO NOT call provider.try_register in python. That will register to the native env. + with EpCatalog() as catalog: + for ep in catalog.find_all_providers(): + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + eps[ep.name] = ep.library_path return eps if __name__ == "__main__": diff --git a/deepseek-ai-DeepSeek-R1-Distill-Qwen-14B/aitk/winml.py b/deepseek-ai-DeepSeek-R1-Distill-Qwen-14B/aitk/winml.py index 74a12c53a..febad5a30 100644 --- a/deepseek-ai-DeepSeek-R1-Distill-Qwen-14B/aitk/winml.py +++ b/deepseek-ai-DeepSeek-R1-Distill-Qwen-14B/aitk/winml.py @@ -1,19 +1,13 @@ import json def _get_ep_paths() -> dict[str, str]: - from winui3.microsoft.windows.applicationmodel.dynamicdependency.bootstrap import ( - InitializeOptions, - initialize - ) - import winui3.microsoft.windows.ai.machinelearning as winml + from windowsml import EpCatalog eps = {} - with initialize(options = InitializeOptions.ON_NO_MATCH_SHOW_UI): - catalog = winml.ExecutionProviderCatalog.get_default() - providers = catalog.find_all_providers() - for provider in providers: - provider.ensure_ready_async().get() - eps[provider.name] = provider.library_path - # DO NOT call provider.try_register in python. That will register to the native env. + with EpCatalog() as catalog: + for ep in catalog.find_all_providers(): + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + eps[ep.name] = ep.library_path return eps if __name__ == "__main__": diff --git a/deepseek-ai-DeepSeek-R1-Distill-Qwen-7B/aitk/winml.py b/deepseek-ai-DeepSeek-R1-Distill-Qwen-7B/aitk/winml.py index 74a12c53a..febad5a30 100644 --- a/deepseek-ai-DeepSeek-R1-Distill-Qwen-7B/aitk/winml.py +++ b/deepseek-ai-DeepSeek-R1-Distill-Qwen-7B/aitk/winml.py @@ -1,19 +1,13 @@ import json def _get_ep_paths() -> dict[str, str]: - from winui3.microsoft.windows.applicationmodel.dynamicdependency.bootstrap import ( - InitializeOptions, - initialize - ) - import winui3.microsoft.windows.ai.machinelearning as winml + from windowsml import EpCatalog eps = {} - with initialize(options = InitializeOptions.ON_NO_MATCH_SHOW_UI): - catalog = winml.ExecutionProviderCatalog.get_default() - providers = catalog.find_all_providers() - for provider in providers: - provider.ensure_ready_async().get() - eps[provider.name] = provider.library_path - # DO NOT call provider.try_register in python. That will register to the native env. + with EpCatalog() as catalog: + for ep in catalog.find_all_providers(): + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + eps[ep.name] = ep.library_path return eps if __name__ == "__main__": diff --git a/google-bert-bert-base-multilingual-cased/aitk/winml.py b/google-bert-bert-base-multilingual-cased/aitk/winml.py index 74a12c53a..febad5a30 100644 --- a/google-bert-bert-base-multilingual-cased/aitk/winml.py +++ b/google-bert-bert-base-multilingual-cased/aitk/winml.py @@ -1,19 +1,13 @@ import json def _get_ep_paths() -> dict[str, str]: - from winui3.microsoft.windows.applicationmodel.dynamicdependency.bootstrap import ( - InitializeOptions, - initialize - ) - import winui3.microsoft.windows.ai.machinelearning as winml + from windowsml import EpCatalog eps = {} - with initialize(options = InitializeOptions.ON_NO_MATCH_SHOW_UI): - catalog = winml.ExecutionProviderCatalog.get_default() - providers = catalog.find_all_providers() - for provider in providers: - provider.ensure_ready_async().get() - eps[provider.name] = provider.library_path - # DO NOT call provider.try_register in python. That will register to the native env. + with EpCatalog() as catalog: + for ep in catalog.find_all_providers(): + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + eps[ep.name] = ep.library_path return eps if __name__ == "__main__": diff --git a/google-vit-base-patch16-224/aitk/winml.py b/google-vit-base-patch16-224/aitk/winml.py index 74a12c53a..febad5a30 100644 --- a/google-vit-base-patch16-224/aitk/winml.py +++ b/google-vit-base-patch16-224/aitk/winml.py @@ -1,19 +1,13 @@ import json def _get_ep_paths() -> dict[str, str]: - from winui3.microsoft.windows.applicationmodel.dynamicdependency.bootstrap import ( - InitializeOptions, - initialize - ) - import winui3.microsoft.windows.ai.machinelearning as winml + from windowsml import EpCatalog eps = {} - with initialize(options = InitializeOptions.ON_NO_MATCH_SHOW_UI): - catalog = winml.ExecutionProviderCatalog.get_default() - providers = catalog.find_all_providers() - for provider in providers: - provider.ensure_ready_async().get() - eps[provider.name] = provider.library_path - # DO NOT call provider.try_register in python. That will register to the native env. + with EpCatalog() as catalog: + for ep in catalog.find_all_providers(): + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + eps[ep.name] = ep.library_path return eps if __name__ == "__main__": diff --git a/laion-CLIP-ViT-B-32-laion2B-s34B-b79K/aitk/winml.py b/laion-CLIP-ViT-B-32-laion2B-s34B-b79K/aitk/winml.py index 74a12c53a..febad5a30 100644 --- a/laion-CLIP-ViT-B-32-laion2B-s34B-b79K/aitk/winml.py +++ b/laion-CLIP-ViT-B-32-laion2B-s34B-b79K/aitk/winml.py @@ -1,19 +1,13 @@ import json def _get_ep_paths() -> dict[str, str]: - from winui3.microsoft.windows.applicationmodel.dynamicdependency.bootstrap import ( - InitializeOptions, - initialize - ) - import winui3.microsoft.windows.ai.machinelearning as winml + from windowsml import EpCatalog eps = {} - with initialize(options = InitializeOptions.ON_NO_MATCH_SHOW_UI): - catalog = winml.ExecutionProviderCatalog.get_default() - providers = catalog.find_all_providers() - for provider in providers: - provider.ensure_ready_async().get() - eps[provider.name] = provider.library_path - # DO NOT call provider.try_register in python. That will register to the native env. + with EpCatalog() as catalog: + for ep in catalog.find_all_providers(): + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + eps[ep.name] = ep.library_path return eps if __name__ == "__main__": diff --git a/meta-llama-Llama-3.1-8B-Instruct/aitk/winml.py b/meta-llama-Llama-3.1-8B-Instruct/aitk/winml.py index 74a12c53a..febad5a30 100644 --- a/meta-llama-Llama-3.1-8B-Instruct/aitk/winml.py +++ b/meta-llama-Llama-3.1-8B-Instruct/aitk/winml.py @@ -1,19 +1,13 @@ import json def _get_ep_paths() -> dict[str, str]: - from winui3.microsoft.windows.applicationmodel.dynamicdependency.bootstrap import ( - InitializeOptions, - initialize - ) - import winui3.microsoft.windows.ai.machinelearning as winml + from windowsml import EpCatalog eps = {} - with initialize(options = InitializeOptions.ON_NO_MATCH_SHOW_UI): - catalog = winml.ExecutionProviderCatalog.get_default() - providers = catalog.find_all_providers() - for provider in providers: - provider.ensure_ready_async().get() - eps[provider.name] = provider.library_path - # DO NOT call provider.try_register in python. That will register to the native env. + with EpCatalog() as catalog: + for ep in catalog.find_all_providers(): + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + eps[ep.name] = ep.library_path return eps if __name__ == "__main__": diff --git a/meta-llama-Llama-3.2-1B-Instruct/aitk/winml.py b/meta-llama-Llama-3.2-1B-Instruct/aitk/winml.py index 74a12c53a..febad5a30 100644 --- a/meta-llama-Llama-3.2-1B-Instruct/aitk/winml.py +++ b/meta-llama-Llama-3.2-1B-Instruct/aitk/winml.py @@ -1,19 +1,13 @@ import json def _get_ep_paths() -> dict[str, str]: - from winui3.microsoft.windows.applicationmodel.dynamicdependency.bootstrap import ( - InitializeOptions, - initialize - ) - import winui3.microsoft.windows.ai.machinelearning as winml + from windowsml import EpCatalog eps = {} - with initialize(options = InitializeOptions.ON_NO_MATCH_SHOW_UI): - catalog = winml.ExecutionProviderCatalog.get_default() - providers = catalog.find_all_providers() - for provider in providers: - provider.ensure_ready_async().get() - eps[provider.name] = provider.library_path - # DO NOT call provider.try_register in python. That will register to the native env. + with EpCatalog() as catalog: + for ep in catalog.find_all_providers(): + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + eps[ep.name] = ep.library_path return eps if __name__ == "__main__": diff --git a/microsoft-Phi-3-mini-128k-instruct/aitk/winml.py b/microsoft-Phi-3-mini-128k-instruct/aitk/winml.py index 74a12c53a..febad5a30 100644 --- a/microsoft-Phi-3-mini-128k-instruct/aitk/winml.py +++ b/microsoft-Phi-3-mini-128k-instruct/aitk/winml.py @@ -1,19 +1,13 @@ import json def _get_ep_paths() -> dict[str, str]: - from winui3.microsoft.windows.applicationmodel.dynamicdependency.bootstrap import ( - InitializeOptions, - initialize - ) - import winui3.microsoft.windows.ai.machinelearning as winml + from windowsml import EpCatalog eps = {} - with initialize(options = InitializeOptions.ON_NO_MATCH_SHOW_UI): - catalog = winml.ExecutionProviderCatalog.get_default() - providers = catalog.find_all_providers() - for provider in providers: - provider.ensure_ready_async().get() - eps[provider.name] = provider.library_path - # DO NOT call provider.try_register in python. That will register to the native env. + with EpCatalog() as catalog: + for ep in catalog.find_all_providers(): + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + eps[ep.name] = ep.library_path return eps if __name__ == "__main__": diff --git a/microsoft-Phi-3-mini-4k-instruct/aitk/winml.py b/microsoft-Phi-3-mini-4k-instruct/aitk/winml.py index 74a12c53a..febad5a30 100644 --- a/microsoft-Phi-3-mini-4k-instruct/aitk/winml.py +++ b/microsoft-Phi-3-mini-4k-instruct/aitk/winml.py @@ -1,19 +1,13 @@ import json def _get_ep_paths() -> dict[str, str]: - from winui3.microsoft.windows.applicationmodel.dynamicdependency.bootstrap import ( - InitializeOptions, - initialize - ) - import winui3.microsoft.windows.ai.machinelearning as winml + from windowsml import EpCatalog eps = {} - with initialize(options = InitializeOptions.ON_NO_MATCH_SHOW_UI): - catalog = winml.ExecutionProviderCatalog.get_default() - providers = catalog.find_all_providers() - for provider in providers: - provider.ensure_ready_async().get() - eps[provider.name] = provider.library_path - # DO NOT call provider.try_register in python. That will register to the native env. + with EpCatalog() as catalog: + for ep in catalog.find_all_providers(): + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + eps[ep.name] = ep.library_path return eps if __name__ == "__main__": diff --git a/microsoft-Phi-3.5-mini-instruct/aitk/winml.py b/microsoft-Phi-3.5-mini-instruct/aitk/winml.py index 74a12c53a..febad5a30 100644 --- a/microsoft-Phi-3.5-mini-instruct/aitk/winml.py +++ b/microsoft-Phi-3.5-mini-instruct/aitk/winml.py @@ -1,19 +1,13 @@ import json def _get_ep_paths() -> dict[str, str]: - from winui3.microsoft.windows.applicationmodel.dynamicdependency.bootstrap import ( - InitializeOptions, - initialize - ) - import winui3.microsoft.windows.ai.machinelearning as winml + from windowsml import EpCatalog eps = {} - with initialize(options = InitializeOptions.ON_NO_MATCH_SHOW_UI): - catalog = winml.ExecutionProviderCatalog.get_default() - providers = catalog.find_all_providers() - for provider in providers: - provider.ensure_ready_async().get() - eps[provider.name] = provider.library_path - # DO NOT call provider.try_register in python. That will register to the native env. + with EpCatalog() as catalog: + for ep in catalog.find_all_providers(): + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + eps[ep.name] = ep.library_path return eps if __name__ == "__main__": diff --git a/microsoft-Phi-4-mini-instruct/aitk/winml.py b/microsoft-Phi-4-mini-instruct/aitk/winml.py index 74a12c53a..febad5a30 100644 --- a/microsoft-Phi-4-mini-instruct/aitk/winml.py +++ b/microsoft-Phi-4-mini-instruct/aitk/winml.py @@ -1,19 +1,13 @@ import json def _get_ep_paths() -> dict[str, str]: - from winui3.microsoft.windows.applicationmodel.dynamicdependency.bootstrap import ( - InitializeOptions, - initialize - ) - import winui3.microsoft.windows.ai.machinelearning as winml + from windowsml import EpCatalog eps = {} - with initialize(options = InitializeOptions.ON_NO_MATCH_SHOW_UI): - catalog = winml.ExecutionProviderCatalog.get_default() - providers = catalog.find_all_providers() - for provider in providers: - provider.ensure_ready_async().get() - eps[provider.name] = provider.library_path - # DO NOT call provider.try_register in python. That will register to the native env. + with EpCatalog() as catalog: + for ep in catalog.find_all_providers(): + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + eps[ep.name] = ep.library_path return eps if __name__ == "__main__": diff --git a/microsoft-Phi-4-mini-reasoning/aitk/winml.py b/microsoft-Phi-4-mini-reasoning/aitk/winml.py index 74a12c53a..febad5a30 100644 --- a/microsoft-Phi-4-mini-reasoning/aitk/winml.py +++ b/microsoft-Phi-4-mini-reasoning/aitk/winml.py @@ -1,19 +1,13 @@ import json def _get_ep_paths() -> dict[str, str]: - from winui3.microsoft.windows.applicationmodel.dynamicdependency.bootstrap import ( - InitializeOptions, - initialize - ) - import winui3.microsoft.windows.ai.machinelearning as winml + from windowsml import EpCatalog eps = {} - with initialize(options = InitializeOptions.ON_NO_MATCH_SHOW_UI): - catalog = winml.ExecutionProviderCatalog.get_default() - providers = catalog.find_all_providers() - for provider in providers: - provider.ensure_ready_async().get() - eps[provider.name] = provider.library_path - # DO NOT call provider.try_register in python. That will register to the native env. + with EpCatalog() as catalog: + for ep in catalog.find_all_providers(): + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + eps[ep.name] = ep.library_path return eps if __name__ == "__main__": diff --git a/microsoft-Phi-4-reasoning-plus/aitk/winml.py b/microsoft-Phi-4-reasoning-plus/aitk/winml.py index 74a12c53a..febad5a30 100644 --- a/microsoft-Phi-4-reasoning-plus/aitk/winml.py +++ b/microsoft-Phi-4-reasoning-plus/aitk/winml.py @@ -1,19 +1,13 @@ import json def _get_ep_paths() -> dict[str, str]: - from winui3.microsoft.windows.applicationmodel.dynamicdependency.bootstrap import ( - InitializeOptions, - initialize - ) - import winui3.microsoft.windows.ai.machinelearning as winml + from windowsml import EpCatalog eps = {} - with initialize(options = InitializeOptions.ON_NO_MATCH_SHOW_UI): - catalog = winml.ExecutionProviderCatalog.get_default() - providers = catalog.find_all_providers() - for provider in providers: - provider.ensure_ready_async().get() - eps[provider.name] = provider.library_path - # DO NOT call provider.try_register in python. That will register to the native env. + with EpCatalog() as catalog: + for ep in catalog.find_all_providers(): + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + eps[ep.name] = ep.library_path return eps if __name__ == "__main__": diff --git a/microsoft-Phi-4-reasoning/aitk/winml.py b/microsoft-Phi-4-reasoning/aitk/winml.py index 74a12c53a..febad5a30 100644 --- a/microsoft-Phi-4-reasoning/aitk/winml.py +++ b/microsoft-Phi-4-reasoning/aitk/winml.py @@ -1,19 +1,13 @@ import json def _get_ep_paths() -> dict[str, str]: - from winui3.microsoft.windows.applicationmodel.dynamicdependency.bootstrap import ( - InitializeOptions, - initialize - ) - import winui3.microsoft.windows.ai.machinelearning as winml + from windowsml import EpCatalog eps = {} - with initialize(options = InitializeOptions.ON_NO_MATCH_SHOW_UI): - catalog = winml.ExecutionProviderCatalog.get_default() - providers = catalog.find_all_providers() - for provider in providers: - provider.ensure_ready_async().get() - eps[provider.name] = provider.library_path - # DO NOT call provider.try_register in python. That will register to the native env. + with EpCatalog() as catalog: + for ep in catalog.find_all_providers(): + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + eps[ep.name] = ep.library_path return eps if __name__ == "__main__": diff --git a/microsoft-Phi-4/aitk/winml.py b/microsoft-Phi-4/aitk/winml.py index 74a12c53a..febad5a30 100644 --- a/microsoft-Phi-4/aitk/winml.py +++ b/microsoft-Phi-4/aitk/winml.py @@ -1,19 +1,13 @@ import json def _get_ep_paths() -> dict[str, str]: - from winui3.microsoft.windows.applicationmodel.dynamicdependency.bootstrap import ( - InitializeOptions, - initialize - ) - import winui3.microsoft.windows.ai.machinelearning as winml + from windowsml import EpCatalog eps = {} - with initialize(options = InitializeOptions.ON_NO_MATCH_SHOW_UI): - catalog = winml.ExecutionProviderCatalog.get_default() - providers = catalog.find_all_providers() - for provider in providers: - provider.ensure_ready_async().get() - eps[provider.name] = provider.library_path - # DO NOT call provider.try_register in python. That will register to the native env. + with EpCatalog() as catalog: + for ep in catalog.find_all_providers(): + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + eps[ep.name] = ep.library_path return eps if __name__ == "__main__": diff --git a/microsoft-resnet-50/aitk/winml.py b/microsoft-resnet-50/aitk/winml.py index 74a12c53a..febad5a30 100644 --- a/microsoft-resnet-50/aitk/winml.py +++ b/microsoft-resnet-50/aitk/winml.py @@ -1,19 +1,13 @@ import json def _get_ep_paths() -> dict[str, str]: - from winui3.microsoft.windows.applicationmodel.dynamicdependency.bootstrap import ( - InitializeOptions, - initialize - ) - import winui3.microsoft.windows.ai.machinelearning as winml + from windowsml import EpCatalog eps = {} - with initialize(options = InitializeOptions.ON_NO_MATCH_SHOW_UI): - catalog = winml.ExecutionProviderCatalog.get_default() - providers = catalog.find_all_providers() - for provider in providers: - provider.ensure_ready_async().get() - eps[provider.name] = provider.library_path - # DO NOT call provider.try_register in python. That will register to the native env. + with EpCatalog() as catalog: + for ep in catalog.find_all_providers(): + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + eps[ep.name] = ep.library_path return eps if __name__ == "__main__": diff --git a/mistralai-Mistral-7B-Instruct-v0.2/aitk/winml.py b/mistralai-Mistral-7B-Instruct-v0.2/aitk/winml.py index 74a12c53a..febad5a30 100644 --- a/mistralai-Mistral-7B-Instruct-v0.2/aitk/winml.py +++ b/mistralai-Mistral-7B-Instruct-v0.2/aitk/winml.py @@ -1,19 +1,13 @@ import json def _get_ep_paths() -> dict[str, str]: - from winui3.microsoft.windows.applicationmodel.dynamicdependency.bootstrap import ( - InitializeOptions, - initialize - ) - import winui3.microsoft.windows.ai.machinelearning as winml + from windowsml import EpCatalog eps = {} - with initialize(options = InitializeOptions.ON_NO_MATCH_SHOW_UI): - catalog = winml.ExecutionProviderCatalog.get_default() - providers = catalog.find_all_providers() - for provider in providers: - provider.ensure_ready_async().get() - eps[provider.name] = provider.library_path - # DO NOT call provider.try_register in python. That will register to the native env. + with EpCatalog() as catalog: + for ep in catalog.find_all_providers(): + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + eps[ep.name] = ep.library_path return eps if __name__ == "__main__": diff --git a/mistralai-Mistral-7B-Instruct-v0.3/aitk/winml.py b/mistralai-Mistral-7B-Instruct-v0.3/aitk/winml.py index 74a12c53a..febad5a30 100644 --- a/mistralai-Mistral-7B-Instruct-v0.3/aitk/winml.py +++ b/mistralai-Mistral-7B-Instruct-v0.3/aitk/winml.py @@ -1,19 +1,13 @@ import json def _get_ep_paths() -> dict[str, str]: - from winui3.microsoft.windows.applicationmodel.dynamicdependency.bootstrap import ( - InitializeOptions, - initialize - ) - import winui3.microsoft.windows.ai.machinelearning as winml + from windowsml import EpCatalog eps = {} - with initialize(options = InitializeOptions.ON_NO_MATCH_SHOW_UI): - catalog = winml.ExecutionProviderCatalog.get_default() - providers = catalog.find_all_providers() - for provider in providers: - provider.ensure_ready_async().get() - eps[provider.name] = provider.library_path - # DO NOT call provider.try_register in python. That will register to the native env. + with EpCatalog() as catalog: + for ep in catalog.find_all_providers(): + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + eps[ep.name] = ep.library_path return eps if __name__ == "__main__": diff --git a/openai-clip-vit-base-patch16/aitk/winml.py b/openai-clip-vit-base-patch16/aitk/winml.py index 74a12c53a..febad5a30 100644 --- a/openai-clip-vit-base-patch16/aitk/winml.py +++ b/openai-clip-vit-base-patch16/aitk/winml.py @@ -1,19 +1,13 @@ import json def _get_ep_paths() -> dict[str, str]: - from winui3.microsoft.windows.applicationmodel.dynamicdependency.bootstrap import ( - InitializeOptions, - initialize - ) - import winui3.microsoft.windows.ai.machinelearning as winml + from windowsml import EpCatalog eps = {} - with initialize(options = InitializeOptions.ON_NO_MATCH_SHOW_UI): - catalog = winml.ExecutionProviderCatalog.get_default() - providers = catalog.find_all_providers() - for provider in providers: - provider.ensure_ready_async().get() - eps[provider.name] = provider.library_path - # DO NOT call provider.try_register in python. That will register to the native env. + with EpCatalog() as catalog: + for ep in catalog.find_all_providers(): + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + eps[ep.name] = ep.library_path return eps if __name__ == "__main__": diff --git a/openai-clip-vit-base-patch32/aitk/winml.py b/openai-clip-vit-base-patch32/aitk/winml.py index 74a12c53a..febad5a30 100644 --- a/openai-clip-vit-base-patch32/aitk/winml.py +++ b/openai-clip-vit-base-patch32/aitk/winml.py @@ -1,19 +1,13 @@ import json def _get_ep_paths() -> dict[str, str]: - from winui3.microsoft.windows.applicationmodel.dynamicdependency.bootstrap import ( - InitializeOptions, - initialize - ) - import winui3.microsoft.windows.ai.machinelearning as winml + from windowsml import EpCatalog eps = {} - with initialize(options = InitializeOptions.ON_NO_MATCH_SHOW_UI): - catalog = winml.ExecutionProviderCatalog.get_default() - providers = catalog.find_all_providers() - for provider in providers: - provider.ensure_ready_async().get() - eps[provider.name] = provider.library_path - # DO NOT call provider.try_register in python. That will register to the native env. + with EpCatalog() as catalog: + for ep in catalog.find_all_providers(): + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + eps[ep.name] = ep.library_path return eps if __name__ == "__main__": diff --git a/openai-clip-vit-large-patch14/aitk/winml.py b/openai-clip-vit-large-patch14/aitk/winml.py index 74a12c53a..febad5a30 100644 --- a/openai-clip-vit-large-patch14/aitk/winml.py +++ b/openai-clip-vit-large-patch14/aitk/winml.py @@ -1,19 +1,13 @@ import json def _get_ep_paths() -> dict[str, str]: - from winui3.microsoft.windows.applicationmodel.dynamicdependency.bootstrap import ( - InitializeOptions, - initialize - ) - import winui3.microsoft.windows.ai.machinelearning as winml + from windowsml import EpCatalog eps = {} - with initialize(options = InitializeOptions.ON_NO_MATCH_SHOW_UI): - catalog = winml.ExecutionProviderCatalog.get_default() - providers = catalog.find_all_providers() - for provider in providers: - provider.ensure_ready_async().get() - eps[provider.name] = provider.library_path - # DO NOT call provider.try_register in python. That will register to the native env. + with EpCatalog() as catalog: + for ep in catalog.find_all_providers(): + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + eps[ep.name] = ep.library_path return eps if __name__ == "__main__": diff --git a/openai-whisper-large-v3-turbo/aitk/winml.py b/openai-whisper-large-v3-turbo/aitk/winml.py index 74a12c53a..febad5a30 100644 --- a/openai-whisper-large-v3-turbo/aitk/winml.py +++ b/openai-whisper-large-v3-turbo/aitk/winml.py @@ -1,19 +1,13 @@ import json def _get_ep_paths() -> dict[str, str]: - from winui3.microsoft.windows.applicationmodel.dynamicdependency.bootstrap import ( - InitializeOptions, - initialize - ) - import winui3.microsoft.windows.ai.machinelearning as winml + from windowsml import EpCatalog eps = {} - with initialize(options = InitializeOptions.ON_NO_MATCH_SHOW_UI): - catalog = winml.ExecutionProviderCatalog.get_default() - providers = catalog.find_all_providers() - for provider in providers: - provider.ensure_ready_async().get() - eps[provider.name] = provider.library_path - # DO NOT call provider.try_register in python. That will register to the native env. + with EpCatalog() as catalog: + for ep in catalog.find_all_providers(): + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + eps[ep.name] = ep.library_path return eps if __name__ == "__main__": diff --git a/sam-vit-base/aitk/winml.py b/sam-vit-base/aitk/winml.py index 74a12c53a..febad5a30 100644 --- a/sam-vit-base/aitk/winml.py +++ b/sam-vit-base/aitk/winml.py @@ -1,19 +1,13 @@ import json def _get_ep_paths() -> dict[str, str]: - from winui3.microsoft.windows.applicationmodel.dynamicdependency.bootstrap import ( - InitializeOptions, - initialize - ) - import winui3.microsoft.windows.ai.machinelearning as winml + from windowsml import EpCatalog eps = {} - with initialize(options = InitializeOptions.ON_NO_MATCH_SHOW_UI): - catalog = winml.ExecutionProviderCatalog.get_default() - providers = catalog.find_all_providers() - for provider in providers: - provider.ensure_ready_async().get() - eps[provider.name] = provider.library_path - # DO NOT call provider.try_register in python. That will register to the native env. + with EpCatalog() as catalog: + for ep in catalog.find_all_providers(): + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + eps[ep.name] = ep.library_path return eps if __name__ == "__main__": diff --git a/sam2.1-hiera-small/aitk/winml.py b/sam2.1-hiera-small/aitk/winml.py index 74a12c53a..febad5a30 100644 --- a/sam2.1-hiera-small/aitk/winml.py +++ b/sam2.1-hiera-small/aitk/winml.py @@ -1,19 +1,13 @@ import json def _get_ep_paths() -> dict[str, str]: - from winui3.microsoft.windows.applicationmodel.dynamicdependency.bootstrap import ( - InitializeOptions, - initialize - ) - import winui3.microsoft.windows.ai.machinelearning as winml + from windowsml import EpCatalog eps = {} - with initialize(options = InitializeOptions.ON_NO_MATCH_SHOW_UI): - catalog = winml.ExecutionProviderCatalog.get_default() - providers = catalog.find_all_providers() - for provider in providers: - provider.ensure_ready_async().get() - eps[provider.name] = provider.library_path - # DO NOT call provider.try_register in python. That will register to the native env. + with EpCatalog() as catalog: + for ep in catalog.find_all_providers(): + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + eps[ep.name] = ep.library_path return eps if __name__ == "__main__": diff --git a/sd-legacy-stable-diffusion-v1-5/aitk/winml.py b/sd-legacy-stable-diffusion-v1-5/aitk/winml.py index 74a12c53a..febad5a30 100644 --- a/sd-legacy-stable-diffusion-v1-5/aitk/winml.py +++ b/sd-legacy-stable-diffusion-v1-5/aitk/winml.py @@ -1,19 +1,13 @@ import json def _get_ep_paths() -> dict[str, str]: - from winui3.microsoft.windows.applicationmodel.dynamicdependency.bootstrap import ( - InitializeOptions, - initialize - ) - import winui3.microsoft.windows.ai.machinelearning as winml + from windowsml import EpCatalog eps = {} - with initialize(options = InitializeOptions.ON_NO_MATCH_SHOW_UI): - catalog = winml.ExecutionProviderCatalog.get_default() - providers = catalog.find_all_providers() - for provider in providers: - provider.ensure_ready_async().get() - eps[provider.name] = provider.library_path - # DO NOT call provider.try_register in python. That will register to the native env. + with EpCatalog() as catalog: + for ep in catalog.find_all_providers(): + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + eps[ep.name] = ep.library_path return eps if __name__ == "__main__": diff --git a/sd2-community-stable-diffusion-2-1/aitk/winml.py b/sd2-community-stable-diffusion-2-1/aitk/winml.py index 74a12c53a..febad5a30 100644 --- a/sd2-community-stable-diffusion-2-1/aitk/winml.py +++ b/sd2-community-stable-diffusion-2-1/aitk/winml.py @@ -1,19 +1,13 @@ import json def _get_ep_paths() -> dict[str, str]: - from winui3.microsoft.windows.applicationmodel.dynamicdependency.bootstrap import ( - InitializeOptions, - initialize - ) - import winui3.microsoft.windows.ai.machinelearning as winml + from windowsml import EpCatalog eps = {} - with initialize(options = InitializeOptions.ON_NO_MATCH_SHOW_UI): - catalog = winml.ExecutionProviderCatalog.get_default() - providers = catalog.find_all_providers() - for provider in providers: - provider.ensure_ready_async().get() - eps[provider.name] = provider.library_path - # DO NOT call provider.try_register in python. That will register to the native env. + with EpCatalog() as catalog: + for ep in catalog.find_all_providers(): + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + eps[ep.name] = ep.library_path return eps if __name__ == "__main__": From 93b9290ddba5f48241661524af5dc83288cfcaa2 Mon Sep 17 00:00:00 2001 From: hualxie Date: Fri, 24 Apr 2026 12:09:13 +0800 Subject: [PATCH 08/12] bump all versions --- .aitk/configs/model_list.json | 82 +++++++++---------- .aitk/scripts/bump_model_versions.py | 3 +- .../aitk/info.yml | 2 +- .../aitk/model_project.config | 2 +- Qwen-Qwen2.5-0.5B-Instruct/aitk/info.yml | 2 +- .../aitk/model_project.config | 2 +- Qwen-Qwen2.5-0.5B/aitk/info.yml | 2 +- Qwen-Qwen2.5-0.5B/aitk/model_project.config | 2 +- Qwen-Qwen2.5-1.5B-Instruct/aitk/info.yml | 2 +- .../aitk/model_project.config | 2 +- Qwen-Qwen2.5-14B-Instruct/aitk/info.yml | 2 +- .../aitk/model_project.config | 2 +- Qwen-Qwen2.5-3B-Instruct/aitk/info.yml | 2 +- .../aitk/model_project.config | 2 +- Qwen-Qwen2.5-7B-Instruct/aitk/info.yml | 2 +- .../aitk/model_project.config | 2 +- .../aitk/info.yml | 2 +- .../aitk/model_project.config | 2 +- .../aitk/info.yml | 2 +- .../aitk/model_project.config | 2 +- Qwen-Qwen2.5-Coder-14B-Instruct/aitk/info.yml | 2 +- .../aitk/model_project.config | 2 +- Qwen-Qwen2.5-Coder-3B-Instruct/aitk/info.yml | 2 +- .../aitk/model_project.config | 2 +- Qwen-Qwen2.5-Coder-7B-Instruct/aitk/info.yml | 2 +- .../aitk/model_project.config | 2 +- .../aitk/info.yml | 2 +- .../aitk/model_project.config | 2 +- .../aitk/info.yml | 2 +- .../aitk/model_project.config | 2 +- .../aitk/info.yml | 2 +- .../aitk/model_project.config | 2 +- .../aitk/info.yml | 2 +- .../aitk/model_project.config | 2 +- .../aitk/info.yml | 2 +- .../aitk/model_project.config | 2 +- google-vit-base-patch16-224/aitk/info.yml | 2 +- .../aitk/model_project.config | 2 +- intel-bert-base-uncased-mrpc/aitk/info.yml | 2 +- .../aitk/model_project.config | 2 +- .../aitk/info.yml | 2 +- .../aitk/model_project.config | 2 +- .../aitk/info.yml | 2 +- .../aitk/model_project.config | 2 +- .../aitk/info.yml | 2 +- .../aitk/model_project.config | 2 +- .../aitk/info.yml | 2 +- .../aitk/model_project.config | 2 +- .../aitk/info.yml | 2 +- .../aitk/model_project.config | 2 +- microsoft-Phi-3.5-mini-instruct/aitk/info.yml | 2 +- .../aitk/model_project.config | 2 +- microsoft-Phi-4-mini-instruct/aitk/info.yml | 2 +- .../aitk/model_project.config | 2 +- microsoft-Phi-4-mini-reasoning/aitk/info.yml | 2 +- .../aitk/model_project.config | 2 +- microsoft-Phi-4-reasoning-plus/aitk/info.yml | 2 +- .../aitk/model_project.config | 2 +- microsoft-Phi-4-reasoning/aitk/info.yml | 2 +- .../aitk/model_project.config | 2 +- microsoft-Phi-4/aitk/info.yml | 2 +- microsoft-Phi-4/aitk/model_project.config | 2 +- microsoft-resnet-50/aitk/info.yml | 2 +- microsoft-resnet-50/aitk/model_project.config | 2 +- .../aitk/info.yml | 2 +- .../aitk/model_project.config | 2 +- .../aitk/info.yml | 2 +- .../aitk/model_project.config | 2 +- openai-clip-vit-base-patch16/aitk/info.yml | 2 +- .../aitk/model_project.config | 2 +- openai-clip-vit-base-patch32/aitk/info.yml | 2 +- .../aitk/model_project.config | 2 +- openai-clip-vit-large-patch14/aitk/info.yml | 2 +- .../aitk/model_project.config | 2 +- openai-whisper-large-v3-turbo/aitk/info.yml | 2 +- .../aitk/model_project.config | 2 +- sam-vit-base/aitk/info.yml | 2 +- sam-vit-base/aitk/model_project.config | 2 +- sam2.1-hiera-small/aitk/info.yml | 2 +- sam2.1-hiera-small/aitk/model_project.config | 2 +- sd-legacy-stable-diffusion-v1-5/aitk/info.yml | 2 +- .../aitk/model_project.config | 2 +- .../aitk/info.yml | 2 +- .../aitk/model_project.config | 2 +- 84 files changed, 125 insertions(+), 124 deletions(-) diff --git a/.aitk/configs/model_list.json b/.aitk/configs/model_list.json index 11abf6887..69bec95c4 100644 --- a/.aitk/configs/model_list.json +++ b/.aitk/configs/model_list.json @@ -18,7 +18,7 @@ "architecture": "Transformer", "status": "Ready", "relativePath": "microsoft-Phi-3.5-mini-instruct/aitk", - "version": 6, + "version": 7, "p0": true, "pipeline_tags": [ "text-generation" @@ -43,7 +43,7 @@ "architecture": "CNN", "status": "Ready", "relativePath": "microsoft-resnet-50/aitk", - "version": 4, + "version": 5, "p0": true, "pipeline_tags": [ "image-classification" @@ -69,7 +69,7 @@ "architecture": "Transformer", "status": "Ready", "relativePath": "deepseek-ai-DeepSeek-R1-Distill-Qwen-1.5B/aitk", - "version": 6, + "version": 7, "p0": true, "pipeline_tags": [ "text-generation" @@ -94,7 +94,7 @@ "architecture": "Transformer", "status": "Ready", "relativePath": "google-bert-bert-base-multilingual-cased/aitk", - "version": 3, + "version": 4, "p0": true, "pipeline_tags": [ "fill-mask" @@ -119,7 +119,7 @@ "architecture": "Transformer", "status": "Ready", "relativePath": "google-vit-base-patch16-224/aitk", - "version": 4, + "version": 5, "p0": true, "pipeline_tags": [ "image-classification" @@ -144,7 +144,7 @@ "architecture": "Transformer", "status": "Ready", "relativePath": "intel-bert-base-uncased-mrpc/aitk", - "version": 3, + "version": 4, "p0": true, "pipeline_tags": [ "text-classification" @@ -169,7 +169,7 @@ "architecture": "Transformer", "status": "Ready", "relativePath": "laion-CLIP-ViT-B-32-laion2B-s34B-b79K/aitk", - "version": 5, + "version": 6, "p0": true, "pipeline_tags": [ "zero-shot-image-classification" @@ -193,7 +193,7 @@ "architecture": "Transformer", "status": "Ready", "relativePath": "meta-llama-Llama-3.2-1B-Instruct/aitk", - "version": 6, + "version": 7, "p0": true, "pipeline_tags": [ "text-generation" @@ -218,7 +218,7 @@ "architecture": "Transformer", "status": "Ready", "relativePath": "openai-clip-vit-base-patch16/aitk", - "version": 5, + "version": 6, "p0": true, "pipeline_tags": [ "zero-shot-image-classification" @@ -243,7 +243,7 @@ "architecture": "Transformer", "status": "Ready", "relativePath": "openai-clip-vit-base-patch32/aitk", - "version": 5, + "version": 6, "p0": true, "pipeline_tags": [ "zero-shot-image-classification" @@ -269,7 +269,7 @@ "architecture": "Transformer", "status": "Ready", "relativePath": "Qwen-Qwen2.5-1.5B-Instruct/aitk", - "version": 6, + "version": 7, "p0": true, "pipeline_tags": [ "text-generation" @@ -293,7 +293,7 @@ "architecture": "Transformer", "status": "Ready", "relativePath": "microsoft-Phi-3-mini-128k-instruct/aitk", - "version": 3, + "version": 4, "pipeline_tags": [ "text-generation" ] @@ -316,7 +316,7 @@ "architecture": "Transformer", "status": "Ready", "relativePath": "microsoft-Phi-3-mini-4k-instruct/aitk", - "version": 3, + "version": 4, "pipeline_tags": [ "text-generation" ] @@ -334,7 +334,7 @@ "architecture": "Transformer", "status": "Ready", "relativePath": "microsoft-Phi-4/aitk", - "version": 2, + "version": 3, "pipeline_tags": [ "text-generation" ] @@ -354,7 +354,7 @@ "architecture": "Transformer", "status": "Ready", "relativePath": "microsoft-Phi-4-mini-instruct/aitk", - "version": 3, + "version": 4, "pipeline_tags": [ "text-generation" ] @@ -373,7 +373,7 @@ "architecture": "Transformer", "status": "Ready", "relativePath": "microsoft-Phi-4-mini-reasoning/aitk", - "version": 3, + "version": 4, "pipeline_tags": [ "text-generation" ] @@ -389,7 +389,7 @@ "architecture": "Transformer", "status": "Ready", "relativePath": "microsoft-Phi-4-reasoning/aitk", - "version": 4, + "version": 5, "pipeline_tags": [ "text-generation" ] @@ -405,7 +405,7 @@ "architecture": "Transformer", "status": "Ready", "relativePath": "microsoft-Phi-4-reasoning-plus/aitk", - "version": 4, + "version": 5, "pipeline_tags": [ "text-generation" ] @@ -423,7 +423,7 @@ "architecture": "Transformer", "status": "Ready", "relativePath": "deepseek-ai-DeepSeek-R1-Distill-Llama-8B/aitk", - "version": 2, + "version": 3, "pipeline_tags": [ "text-generation" ] @@ -445,7 +445,7 @@ "architecture": "Transformer", "status": "Ready", "relativePath": "deepseek-ai-DeepSeek-R1-Distill-Qwen-7B/aitk", - "version": 3, + "version": 4, "pipeline_tags": [ "text-generation" ] @@ -466,7 +466,7 @@ "architecture": "Transformer", "status": "Ready", "relativePath": "deepseek-ai-DeepSeek-R1-Distill-Qwen-14B/aitk", - "version": 3, + "version": 4, "pipeline_tags": [ "text-generation" ] @@ -482,7 +482,7 @@ "architecture": "Transformer", "status": "Hide", "relativePath": "sam-vit-base/aitk", - "version": 1, + "version": 2, "pipeline_tags": [ "fill-mask" ] @@ -498,7 +498,7 @@ "architecture": "Transformer", "status": "Hide", "relativePath": "sam2.1-hiera-small/aitk", - "version": 1, + "version": 2, "pipeline_tags": [ "fill-mask" ] @@ -520,7 +520,7 @@ "architecture": "Transformer", "status": "Ready", "relativePath": "meta-llama-Llama-3.1-8B-Instruct/aitk", - "version": 4, + "version": 5, "p0": false, "pipeline_tags": [ "text-generation" @@ -541,7 +541,7 @@ "architecture": "Transformer", "status": "Ready", "relativePath": "mistralai-Mistral-7B-Instruct-v0.2/aitk", - "version": 2, + "version": 3, "pipeline_tags": [ "text-generation" ] @@ -558,7 +558,7 @@ "architecture": "Transformer", "status": "Ready", "relativePath": "mistralai-Mistral-7B-Instruct-v0.3/aitk", - "version": 3, + "version": 4, "pipeline_tags": [ "text-generation" ] @@ -576,7 +576,7 @@ "architecture": "Transformer", "status": "Ready", "relativePath": "OFA-Sys-chinese-clip-vit-base-patch16/aitk", - "version": 1, + "version": 2, "p0": false, "pipeline_tags": [ "zero-shot-image-classification" @@ -600,7 +600,7 @@ "architecture": "Transformer", "status": "Ready", "relativePath": "openai-clip-vit-large-patch14/aitk", - "version": 1, + "version": 2, "p0": false, "pipeline_tags": [ "zero-shot-image-classification" @@ -617,7 +617,7 @@ "architecture": "Transformer", "status": "Ready", "relativePath": "openai-whisper-large-v3-turbo/aitk", - "version": 1, + "version": 2, "pipeline_tags": [ "automatic-speech-recognition" ] @@ -634,7 +634,7 @@ "architecture": "Transformer", "status": "Hide", "relativePath": "Qwen-Qwen2.5-0.5B/aitk", - "version": 2, + "version": 3, "pipeline_tags": [ "text-generation" ] @@ -656,7 +656,7 @@ "architecture": "Transformer", "status": "Ready", "relativePath": "Qwen-Qwen2.5-0.5B-Instruct/aitk", - "version": 3, + "version": 4, "pipeline_tags": [ "text-generation" ] @@ -676,7 +676,7 @@ "architecture": "Transformer", "status": "Ready", "relativePath": "Qwen-Qwen2.5-3B-Instruct/aitk", - "version": 3, + "version": 4, "pipeline_tags": [ "text-generation" ] @@ -699,7 +699,7 @@ "architecture": "Transformer", "status": "Ready", "relativePath": "Qwen-Qwen2.5-7B-Instruct/aitk", - "version": 3, + "version": 4, "pipeline_tags": [ "text-generation" ] @@ -720,7 +720,7 @@ "architecture": "Transformer", "status": "Ready", "relativePath": "Qwen-Qwen2.5-14B-Instruct/aitk", - "version": 3, + "version": 4, "pipeline_tags": [ "text-generation" ] @@ -742,7 +742,7 @@ "architecture": "Transformer", "status": "Ready", "relativePath": "Qwen-Qwen2.5-Coder-0.5B-Instruct/aitk", - "version": 3, + "version": 4, "pipeline_tags": [ "text-generation" ] @@ -764,7 +764,7 @@ "architecture": "Transformer", "status": "Ready", "relativePath": "Qwen-Qwen2.5-Coder-1.5B-Instruct/aitk", - "version": 3, + "version": 4, "pipeline_tags": [ "text-generation" ] @@ -784,7 +784,7 @@ "architecture": "Transformer", "status": "Ready", "relativePath": "Qwen-Qwen2.5-Coder-3B-Instruct/aitk", - "version": 3, + "version": 4, "pipeline_tags": [ "text-generation" ] @@ -806,7 +806,7 @@ "architecture": "Transformer", "status": "Ready", "relativePath": "Qwen-Qwen2.5-Coder-7B-Instruct/aitk", - "version": 3, + "version": 4, "pipeline_tags": [ "text-generation" ] @@ -827,7 +827,7 @@ "architecture": "Transformer", "status": "Ready", "relativePath": "Qwen-Qwen2.5-Coder-14B-Instruct/aitk", - "version": 3, + "version": 4, "pipeline_tags": [ "text-generation" ] @@ -845,7 +845,7 @@ "architecture": "Transformer", "status": "Hide", "relativePath": "sd2-community-stable-diffusion-2-1/aitk", - "version": 1, + "version": 2, "pipeline_tags": [ "text-to-image" ] @@ -863,7 +863,7 @@ "architecture": "Transformer", "status": "Ready", "relativePath": "sd-legacy-stable-diffusion-v1-5/aitk", - "version": 2, + "version": 3, "pipeline_tags": [ "text-to-image" ] diff --git a/.aitk/scripts/bump_model_versions.py b/.aitk/scripts/bump_model_versions.py index 6297d8d9a..a041fa409 100644 --- a/.aitk/scripts/bump_model_versions.py +++ b/.aitk/scripts/bump_model_versions.py @@ -92,8 +92,9 @@ def main(): description="Batch increase or decrease aitk.modelInfo.version across all info.yml files." ) parser.add_argument( - "delta", + "--delta", type=int, + default=1, help="Integer delta to apply (e.g. +1, -1, 2). Must not reduce any version below 1.", ) parser.add_argument( diff --git a/OFA-Sys-chinese-clip-vit-base-patch16/aitk/info.yml b/OFA-Sys-chinese-clip-vit-base-patch16/aitk/info.yml index e2047d0d0..73a2264ff 100644 --- a/OFA-Sys-chinese-clip-vit-base-patch16/aitk/info.yml +++ b/OFA-Sys-chinese-clip-vit-base-patch16/aitk/info.yml @@ -11,5 +11,5 @@ recipes: aitk: modelInfo: id: "huggingface/OFA-Sys/chinese-clip-vit-base-patch16" - version: 1 + version: 2 p0: false diff --git a/OFA-Sys-chinese-clip-vit-base-patch16/aitk/model_project.config b/OFA-Sys-chinese-clip-vit-base-patch16/aitk/model_project.config index 80a1c2b2c..e7d8191f0 100644 --- a/OFA-Sys-chinese-clip-vit-base-patch16/aitk/model_project.config +++ b/OFA-Sys-chinese-clip-vit-base-patch16/aitk/model_project.config @@ -7,6 +7,6 @@ ], "modelInfo": { "id": "huggingface/OFA-Sys/chinese-clip-vit-base-patch16", - "version": 1 + "version": 2 } } diff --git a/Qwen-Qwen2.5-0.5B-Instruct/aitk/info.yml b/Qwen-Qwen2.5-0.5B-Instruct/aitk/info.yml index d1094c462..8519f895f 100644 --- a/Qwen-Qwen2.5-0.5B-Instruct/aitk/info.yml +++ b/Qwen-Qwen2.5-0.5B-Instruct/aitk/info.yml @@ -26,6 +26,6 @@ recipes: aitk: modelInfo: id: "huggingface/Qwen/Qwen2.5-0.5B-Instruct" - version: 3 + version: 4 groupId: "huggingface/Qwen/Qwen2.5-1.5B-Instruct" groupItemName: "0.5B" diff --git a/Qwen-Qwen2.5-0.5B-Instruct/aitk/model_project.config b/Qwen-Qwen2.5-0.5B-Instruct/aitk/model_project.config index 1ceef71e6..ce6773470 100644 --- a/Qwen-Qwen2.5-0.5B-Instruct/aitk/model_project.config +++ b/Qwen-Qwen2.5-0.5B-Instruct/aitk/model_project.config @@ -19,6 +19,6 @@ ], "modelInfo": { "id": "huggingface/Qwen/Qwen2.5-0.5B-Instruct", - "version": 3 + "version": 4 } } diff --git a/Qwen-Qwen2.5-0.5B/aitk/info.yml b/Qwen-Qwen2.5-0.5B/aitk/info.yml index dced0e4ff..f5a97101b 100644 --- a/Qwen-Qwen2.5-0.5B/aitk/info.yml +++ b/Qwen-Qwen2.5-0.5B/aitk/info.yml @@ -14,5 +14,5 @@ recipes: aitk: modelInfo: id: "huggingface/Qwen/Qwen2.5-0.5B" - version: 2 + version: 3 status: Hide diff --git a/Qwen-Qwen2.5-0.5B/aitk/model_project.config b/Qwen-Qwen2.5-0.5B/aitk/model_project.config index b0e834cfa..8d1f9601b 100644 --- a/Qwen-Qwen2.5-0.5B/aitk/model_project.config +++ b/Qwen-Qwen2.5-0.5B/aitk/model_project.config @@ -7,6 +7,6 @@ ], "modelInfo": { "id": "huggingface/Qwen/Qwen2.5-0.5B", - "version": 2 + "version": 3 } } diff --git a/Qwen-Qwen2.5-1.5B-Instruct/aitk/info.yml b/Qwen-Qwen2.5-1.5B-Instruct/aitk/info.yml index 09794cb70..ccb305cb0 100644 --- a/Qwen-Qwen2.5-1.5B-Instruct/aitk/info.yml +++ b/Qwen-Qwen2.5-1.5B-Instruct/aitk/info.yml @@ -42,7 +42,7 @@ recipes: aitk: modelInfo: id: "huggingface/Qwen/Qwen2.5-1.5B-Instruct" - version: 6 + version: 7 groupId: "huggingface/Qwen/Qwen2.5-1.5B-Instruct" groupItemName: "1.5B" p0: true diff --git a/Qwen-Qwen2.5-1.5B-Instruct/aitk/model_project.config b/Qwen-Qwen2.5-1.5B-Instruct/aitk/model_project.config index 8b192b6f5..fdd9f88f7 100644 --- a/Qwen-Qwen2.5-1.5B-Instruct/aitk/model_project.config +++ b/Qwen-Qwen2.5-1.5B-Instruct/aitk/model_project.config @@ -31,6 +31,6 @@ ], "modelInfo": { "id": "huggingface/Qwen/Qwen2.5-1.5B-Instruct", - "version": 6 + "version": 7 } } diff --git a/Qwen-Qwen2.5-14B-Instruct/aitk/info.yml b/Qwen-Qwen2.5-14B-Instruct/aitk/info.yml index b97700d72..fad28a6cb 100644 --- a/Qwen-Qwen2.5-14B-Instruct/aitk/info.yml +++ b/Qwen-Qwen2.5-14B-Instruct/aitk/info.yml @@ -19,6 +19,6 @@ recipes: aitk: modelInfo: id: "huggingface/Qwen/Qwen2.5-14B-Instruct" - version: 3 + version: 4 groupId: "huggingface/Qwen/Qwen2.5-1.5B-Instruct" groupItemName: "14B" diff --git a/Qwen-Qwen2.5-14B-Instruct/aitk/model_project.config b/Qwen-Qwen2.5-14B-Instruct/aitk/model_project.config index a2effae8b..61d4a09e9 100644 --- a/Qwen-Qwen2.5-14B-Instruct/aitk/model_project.config +++ b/Qwen-Qwen2.5-14B-Instruct/aitk/model_project.config @@ -15,6 +15,6 @@ ], "modelInfo": { "id": "huggingface/Qwen/Qwen2.5-14B-Instruct", - "version": 3 + "version": 4 } } diff --git a/Qwen-Qwen2.5-3B-Instruct/aitk/info.yml b/Qwen-Qwen2.5-3B-Instruct/aitk/info.yml index 79c94c730..97131a7f9 100644 --- a/Qwen-Qwen2.5-3B-Instruct/aitk/info.yml +++ b/Qwen-Qwen2.5-3B-Instruct/aitk/info.yml @@ -14,6 +14,6 @@ recipes: aitk: modelInfo: id: "huggingface/Qwen/Qwen2.5-3B-Instruct" - version: 3 + version: 4 groupId: "huggingface/Qwen/Qwen2.5-1.5B-Instruct" groupItemName: "3B" diff --git a/Qwen-Qwen2.5-3B-Instruct/aitk/model_project.config b/Qwen-Qwen2.5-3B-Instruct/aitk/model_project.config index 4e6839864..469669b46 100644 --- a/Qwen-Qwen2.5-3B-Instruct/aitk/model_project.config +++ b/Qwen-Qwen2.5-3B-Instruct/aitk/model_project.config @@ -11,6 +11,6 @@ ], "modelInfo": { "id": "huggingface/Qwen/Qwen2.5-3B-Instruct", - "version": 3 + "version": 4 } } diff --git a/Qwen-Qwen2.5-7B-Instruct/aitk/info.yml b/Qwen-Qwen2.5-7B-Instruct/aitk/info.yml index 4ee639f25..436dd28d3 100644 --- a/Qwen-Qwen2.5-7B-Instruct/aitk/info.yml +++ b/Qwen-Qwen2.5-7B-Instruct/aitk/info.yml @@ -31,6 +31,6 @@ recipes: aitk: modelInfo: id: "huggingface/Qwen/Qwen2.5-7B-Instruct" - version: 3 + version: 4 groupId: "huggingface/Qwen/Qwen2.5-1.5B-Instruct" groupItemName: "7B" diff --git a/Qwen-Qwen2.5-7B-Instruct/aitk/model_project.config b/Qwen-Qwen2.5-7B-Instruct/aitk/model_project.config index 22cfcef9a..05f41f298 100644 --- a/Qwen-Qwen2.5-7B-Instruct/aitk/model_project.config +++ b/Qwen-Qwen2.5-7B-Instruct/aitk/model_project.config @@ -23,6 +23,6 @@ ], "modelInfo": { "id": "huggingface/Qwen/Qwen2.5-7B-Instruct", - "version": 3 + "version": 4 } } diff --git a/Qwen-Qwen2.5-Coder-0.5B-Instruct/aitk/info.yml b/Qwen-Qwen2.5-Coder-0.5B-Instruct/aitk/info.yml index 5e57ca91b..e81f5dd25 100644 --- a/Qwen-Qwen2.5-Coder-0.5B-Instruct/aitk/info.yml +++ b/Qwen-Qwen2.5-Coder-0.5B-Instruct/aitk/info.yml @@ -26,6 +26,6 @@ recipes: aitk: modelInfo: id: "huggingface/Qwen/Qwen2.5-Coder-0.5B-Instruct" - version: 3 + version: 4 groupId: "huggingface/Qwen/Qwen2.5-Coder-1.5B-Instruct" groupItemName: "0.5B" diff --git a/Qwen-Qwen2.5-Coder-0.5B-Instruct/aitk/model_project.config b/Qwen-Qwen2.5-Coder-0.5B-Instruct/aitk/model_project.config index 7c9b62593..580cad56f 100644 --- a/Qwen-Qwen2.5-Coder-0.5B-Instruct/aitk/model_project.config +++ b/Qwen-Qwen2.5-Coder-0.5B-Instruct/aitk/model_project.config @@ -19,6 +19,6 @@ ], "modelInfo": { "id": "huggingface/Qwen/Qwen2.5-Coder-0.5B-Instruct", - "version": 3 + "version": 4 } } diff --git a/Qwen-Qwen2.5-Coder-1.5B-Instruct/aitk/info.yml b/Qwen-Qwen2.5-Coder-1.5B-Instruct/aitk/info.yml index 25c402332..d3ac683e5 100644 --- a/Qwen-Qwen2.5-Coder-1.5B-Instruct/aitk/info.yml +++ b/Qwen-Qwen2.5-Coder-1.5B-Instruct/aitk/info.yml @@ -26,6 +26,6 @@ recipes: aitk: modelInfo: id: "huggingface/Qwen/Qwen2.5-Coder-1.5B-Instruct" - version: 3 + version: 4 groupId: "huggingface/Qwen/Qwen2.5-Coder-1.5B-Instruct" groupItemName: "1.5B" diff --git a/Qwen-Qwen2.5-Coder-1.5B-Instruct/aitk/model_project.config b/Qwen-Qwen2.5-Coder-1.5B-Instruct/aitk/model_project.config index d94576e9b..97a7d2511 100644 --- a/Qwen-Qwen2.5-Coder-1.5B-Instruct/aitk/model_project.config +++ b/Qwen-Qwen2.5-Coder-1.5B-Instruct/aitk/model_project.config @@ -19,6 +19,6 @@ ], "modelInfo": { "id": "huggingface/Qwen/Qwen2.5-Coder-1.5B-Instruct", - "version": 3 + "version": 4 } } diff --git a/Qwen-Qwen2.5-Coder-14B-Instruct/aitk/info.yml b/Qwen-Qwen2.5-Coder-14B-Instruct/aitk/info.yml index a7a9b00a8..851156d7c 100644 --- a/Qwen-Qwen2.5-Coder-14B-Instruct/aitk/info.yml +++ b/Qwen-Qwen2.5-Coder-14B-Instruct/aitk/info.yml @@ -19,6 +19,6 @@ recipes: aitk: modelInfo: id: "huggingface/Qwen/Qwen2.5-Coder-14B-Instruct" - version: 3 + version: 4 groupId: "huggingface/Qwen/Qwen2.5-Coder-1.5B-Instruct" groupItemName: "14B" diff --git a/Qwen-Qwen2.5-Coder-14B-Instruct/aitk/model_project.config b/Qwen-Qwen2.5-Coder-14B-Instruct/aitk/model_project.config index d00280595..07efbca1b 100644 --- a/Qwen-Qwen2.5-Coder-14B-Instruct/aitk/model_project.config +++ b/Qwen-Qwen2.5-Coder-14B-Instruct/aitk/model_project.config @@ -15,6 +15,6 @@ ], "modelInfo": { "id": "huggingface/Qwen/Qwen2.5-Coder-14B-Instruct", - "version": 3 + "version": 4 } } diff --git a/Qwen-Qwen2.5-Coder-3B-Instruct/aitk/info.yml b/Qwen-Qwen2.5-Coder-3B-Instruct/aitk/info.yml index d60431648..ba9405f68 100644 --- a/Qwen-Qwen2.5-Coder-3B-Instruct/aitk/info.yml +++ b/Qwen-Qwen2.5-Coder-3B-Instruct/aitk/info.yml @@ -14,6 +14,6 @@ recipes: aitk: modelInfo: id: "huggingface/Qwen/Qwen2.5-Coder-3B-Instruct" - version: 3 + version: 4 groupId: "huggingface/Qwen/Qwen2.5-Coder-1.5B-Instruct" groupItemName: "3B" diff --git a/Qwen-Qwen2.5-Coder-3B-Instruct/aitk/model_project.config b/Qwen-Qwen2.5-Coder-3B-Instruct/aitk/model_project.config index 9276eb450..a2e1c2252 100644 --- a/Qwen-Qwen2.5-Coder-3B-Instruct/aitk/model_project.config +++ b/Qwen-Qwen2.5-Coder-3B-Instruct/aitk/model_project.config @@ -11,6 +11,6 @@ ], "modelInfo": { "id": "huggingface/Qwen/Qwen2.5-Coder-3B-Instruct", - "version": 3 + "version": 4 } } diff --git a/Qwen-Qwen2.5-Coder-7B-Instruct/aitk/info.yml b/Qwen-Qwen2.5-Coder-7B-Instruct/aitk/info.yml index 130e14d3c..1349bfbf6 100644 --- a/Qwen-Qwen2.5-Coder-7B-Instruct/aitk/info.yml +++ b/Qwen-Qwen2.5-Coder-7B-Instruct/aitk/info.yml @@ -26,6 +26,6 @@ recipes: aitk: modelInfo: id: "huggingface/Qwen/Qwen2.5-Coder-7B-Instruct" - version: 3 + version: 4 groupId: "huggingface/Qwen/Qwen2.5-Coder-1.5B-Instruct" groupItemName: "7B" diff --git a/Qwen-Qwen2.5-Coder-7B-Instruct/aitk/model_project.config b/Qwen-Qwen2.5-Coder-7B-Instruct/aitk/model_project.config index 99597601d..064bbc590 100644 --- a/Qwen-Qwen2.5-Coder-7B-Instruct/aitk/model_project.config +++ b/Qwen-Qwen2.5-Coder-7B-Instruct/aitk/model_project.config @@ -19,6 +19,6 @@ ], "modelInfo": { "id": "huggingface/Qwen/Qwen2.5-Coder-7B-Instruct", - "version": 3 + "version": 4 } } diff --git a/deepseek-ai-DeepSeek-R1-Distill-Llama-8B/aitk/info.yml b/deepseek-ai-DeepSeek-R1-Distill-Llama-8B/aitk/info.yml index b0b165ef1..2d0eaeca7 100644 --- a/deepseek-ai-DeepSeek-R1-Distill-Llama-8B/aitk/info.yml +++ b/deepseek-ai-DeepSeek-R1-Distill-Llama-8B/aitk/info.yml @@ -14,4 +14,4 @@ recipes: aitk: modelInfo: id: "huggingface/deepseek-ai/DeepSeek-R1-Distill-Llama-8B" - version: 2 + version: 3 diff --git a/deepseek-ai-DeepSeek-R1-Distill-Llama-8B/aitk/model_project.config b/deepseek-ai-DeepSeek-R1-Distill-Llama-8B/aitk/model_project.config index 5dc912c90..9c35008d1 100644 --- a/deepseek-ai-DeepSeek-R1-Distill-Llama-8B/aitk/model_project.config +++ b/deepseek-ai-DeepSeek-R1-Distill-Llama-8B/aitk/model_project.config @@ -11,6 +11,6 @@ ], "modelInfo": { "id": "huggingface/deepseek-ai/DeepSeek-R1-Distill-Llama-8B", - "version": 2 + "version": 3 } } diff --git a/deepseek-ai-DeepSeek-R1-Distill-Qwen-1.5B/aitk/info.yml b/deepseek-ai-DeepSeek-R1-Distill-Qwen-1.5B/aitk/info.yml index dc61befc4..de74c9f58 100644 --- a/deepseek-ai-DeepSeek-R1-Distill-Qwen-1.5B/aitk/info.yml +++ b/deepseek-ai-DeepSeek-R1-Distill-Qwen-1.5B/aitk/info.yml @@ -42,7 +42,7 @@ recipes: aitk: modelInfo: id: "huggingface/deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B" - version: 6 + version: 7 groupId: "huggingface/deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B" groupItemName: "1.5B" p0: true diff --git a/deepseek-ai-DeepSeek-R1-Distill-Qwen-1.5B/aitk/model_project.config b/deepseek-ai-DeepSeek-R1-Distill-Qwen-1.5B/aitk/model_project.config index c997fb66b..64ea7551e 100644 --- a/deepseek-ai-DeepSeek-R1-Distill-Qwen-1.5B/aitk/model_project.config +++ b/deepseek-ai-DeepSeek-R1-Distill-Qwen-1.5B/aitk/model_project.config @@ -31,6 +31,6 @@ ], "modelInfo": { "id": "huggingface/deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B", - "version": 6 + "version": 7 } } diff --git a/deepseek-ai-DeepSeek-R1-Distill-Qwen-14B/aitk/info.yml b/deepseek-ai-DeepSeek-R1-Distill-Qwen-14B/aitk/info.yml index 7ee1ebe60..41ebdb3c6 100644 --- a/deepseek-ai-DeepSeek-R1-Distill-Qwen-14B/aitk/info.yml +++ b/deepseek-ai-DeepSeek-R1-Distill-Qwen-14B/aitk/info.yml @@ -19,6 +19,6 @@ recipes: aitk: modelInfo: id: "huggingface/deepseek-ai/DeepSeek-R1-Distill-Qwen-14B" - version: 3 + version: 4 groupId: "huggingface/deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B" groupItemName: "14B" diff --git a/deepseek-ai-DeepSeek-R1-Distill-Qwen-14B/aitk/model_project.config b/deepseek-ai-DeepSeek-R1-Distill-Qwen-14B/aitk/model_project.config index ca4ecb75a..dd60ac290 100644 --- a/deepseek-ai-DeepSeek-R1-Distill-Qwen-14B/aitk/model_project.config +++ b/deepseek-ai-DeepSeek-R1-Distill-Qwen-14B/aitk/model_project.config @@ -15,6 +15,6 @@ ], "modelInfo": { "id": "huggingface/deepseek-ai/DeepSeek-R1-Distill-Qwen-14B", - "version": 3 + "version": 4 } } diff --git a/deepseek-ai-DeepSeek-R1-Distill-Qwen-7B/aitk/info.yml b/deepseek-ai-DeepSeek-R1-Distill-Qwen-7B/aitk/info.yml index 98f0e37dc..35e0786d3 100644 --- a/deepseek-ai-DeepSeek-R1-Distill-Qwen-7B/aitk/info.yml +++ b/deepseek-ai-DeepSeek-R1-Distill-Qwen-7B/aitk/info.yml @@ -26,6 +26,6 @@ recipes: aitk: modelInfo: id: "huggingface/deepseek-ai/DeepSeek-R1-Distill-Qwen-7B" - version: 3 + version: 4 groupId: "huggingface/deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B" groupItemName: "7B" diff --git a/deepseek-ai-DeepSeek-R1-Distill-Qwen-7B/aitk/model_project.config b/deepseek-ai-DeepSeek-R1-Distill-Qwen-7B/aitk/model_project.config index dbbf40e59..a580ed0c0 100644 --- a/deepseek-ai-DeepSeek-R1-Distill-Qwen-7B/aitk/model_project.config +++ b/deepseek-ai-DeepSeek-R1-Distill-Qwen-7B/aitk/model_project.config @@ -19,6 +19,6 @@ ], "modelInfo": { "id": "huggingface/deepseek-ai/DeepSeek-R1-Distill-Qwen-7B", - "version": 3 + "version": 4 } } diff --git a/google-bert-bert-base-multilingual-cased/aitk/info.yml b/google-bert-bert-base-multilingual-cased/aitk/info.yml index cdfa911f4..c3bf4db00 100644 --- a/google-bert-bert-base-multilingual-cased/aitk/info.yml +++ b/google-bert-bert-base-multilingual-cased/aitk/info.yml @@ -29,5 +29,5 @@ recipes: aitk: modelInfo: id: "huggingface/google-bert/bert-base-multilingual-cased" - version: 3 + version: 4 p0: true diff --git a/google-bert-bert-base-multilingual-cased/aitk/model_project.config b/google-bert-bert-base-multilingual-cased/aitk/model_project.config index 0c243b19c..c7a3fa7da 100644 --- a/google-bert-bert-base-multilingual-cased/aitk/model_project.config +++ b/google-bert-bert-base-multilingual-cased/aitk/model_project.config @@ -31,6 +31,6 @@ ], "modelInfo": { "id": "huggingface/google-bert/bert-base-multilingual-cased", - "version": 3 + "version": 4 } } diff --git a/google-vit-base-patch16-224/aitk/info.yml b/google-vit-base-patch16-224/aitk/info.yml index 5a4186142..00835ef69 100644 --- a/google-vit-base-patch16-224/aitk/info.yml +++ b/google-vit-base-patch16-224/aitk/info.yml @@ -29,5 +29,5 @@ recipes: aitk: modelInfo: id: "huggingface/google/vit-base-patch16-224" - version: 4 + version: 5 p0: true diff --git a/google-vit-base-patch16-224/aitk/model_project.config b/google-vit-base-patch16-224/aitk/model_project.config index a06dd8750..a13675ac8 100644 --- a/google-vit-base-patch16-224/aitk/model_project.config +++ b/google-vit-base-patch16-224/aitk/model_project.config @@ -31,6 +31,6 @@ ], "modelInfo": { "id": "huggingface/google/vit-base-patch16-224", - "version": 4 + "version": 5 } } diff --git a/intel-bert-base-uncased-mrpc/aitk/info.yml b/intel-bert-base-uncased-mrpc/aitk/info.yml index db957fe08..f8781cde7 100644 --- a/intel-bert-base-uncased-mrpc/aitk/info.yml +++ b/intel-bert-base-uncased-mrpc/aitk/info.yml @@ -32,5 +32,5 @@ recipes: aitk: modelInfo: id: "huggingface/Intel/bert-base-uncased-mrpc" - version: 3 + version: 4 p0: true diff --git a/intel-bert-base-uncased-mrpc/aitk/model_project.config b/intel-bert-base-uncased-mrpc/aitk/model_project.config index 5b21e504f..72a32db9d 100644 --- a/intel-bert-base-uncased-mrpc/aitk/model_project.config +++ b/intel-bert-base-uncased-mrpc/aitk/model_project.config @@ -31,6 +31,6 @@ ], "modelInfo": { "id": "huggingface/Intel/bert-base-uncased-mrpc", - "version": 3 + "version": 4 } } diff --git a/laion-CLIP-ViT-B-32-laion2B-s34B-b79K/aitk/info.yml b/laion-CLIP-ViT-B-32-laion2B-s34B-b79K/aitk/info.yml index ffde088d1..cc0da630e 100644 --- a/laion-CLIP-ViT-B-32-laion2B-s34B-b79K/aitk/info.yml +++ b/laion-CLIP-ViT-B-32-laion2B-s34B-b79K/aitk/info.yml @@ -29,5 +29,5 @@ recipes: aitk: modelInfo: id: "huggingface/laion/CLIP-ViT-B-32-laion2B-s34B-b79K" - version: 5 + version: 6 p0: true diff --git a/laion-CLIP-ViT-B-32-laion2B-s34B-b79K/aitk/model_project.config b/laion-CLIP-ViT-B-32-laion2B-s34B-b79K/aitk/model_project.config index a9a556885..2ebfd7066 100644 --- a/laion-CLIP-ViT-B-32-laion2B-s34B-b79K/aitk/model_project.config +++ b/laion-CLIP-ViT-B-32-laion2B-s34B-b79K/aitk/model_project.config @@ -31,6 +31,6 @@ ], "modelInfo": { "id": "huggingface/laion/CLIP-ViT-B-32-laion2B-s34B-b79K", - "version": 5 + "version": 6 } } diff --git a/meta-llama-Llama-3.1-8B-Instruct/aitk/info.yml b/meta-llama-Llama-3.1-8B-Instruct/aitk/info.yml index 9c928c5a3..76ede4ce4 100644 --- a/meta-llama-Llama-3.1-8B-Instruct/aitk/info.yml +++ b/meta-llama-Llama-3.1-8B-Instruct/aitk/info.yml @@ -35,5 +35,5 @@ recipes: aitk: modelInfo: id: "huggingface/meta-llama/Llama-3.1-8B-Instruct" - version: 4 + version: 5 p0: false diff --git a/meta-llama-Llama-3.1-8B-Instruct/aitk/model_project.config b/meta-llama-Llama-3.1-8B-Instruct/aitk/model_project.config index 8a2b9d15b..8ab8dedc4 100644 --- a/meta-llama-Llama-3.1-8B-Instruct/aitk/model_project.config +++ b/meta-llama-Llama-3.1-8B-Instruct/aitk/model_project.config @@ -27,6 +27,6 @@ ], "modelInfo": { "id": "huggingface/meta-llama/Llama-3.1-8B-Instruct", - "version": 4 + "version": 5 } } diff --git a/meta-llama-Llama-3.2-1B-Instruct/aitk/info.yml b/meta-llama-Llama-3.2-1B-Instruct/aitk/info.yml index cf6187b73..9269c7485 100644 --- a/meta-llama-Llama-3.2-1B-Instruct/aitk/info.yml +++ b/meta-llama-Llama-3.2-1B-Instruct/aitk/info.yml @@ -42,5 +42,5 @@ recipes: aitk: modelInfo: id: "huggingface/meta-llama/Llama-3.2-1B-Instruct" - version: 6 + version: 7 p0: true diff --git a/meta-llama-Llama-3.2-1B-Instruct/aitk/model_project.config b/meta-llama-Llama-3.2-1B-Instruct/aitk/model_project.config index 3887e2f47..3df076bbb 100644 --- a/meta-llama-Llama-3.2-1B-Instruct/aitk/model_project.config +++ b/meta-llama-Llama-3.2-1B-Instruct/aitk/model_project.config @@ -31,6 +31,6 @@ ], "modelInfo": { "id": "huggingface/meta-llama/Llama-3.2-1B-Instruct", - "version": 6 + "version": 7 } } diff --git a/microsoft-Phi-3-mini-128k-instruct/aitk/info.yml b/microsoft-Phi-3-mini-128k-instruct/aitk/info.yml index 22db50e95..0e74ebd00 100644 --- a/microsoft-Phi-3-mini-128k-instruct/aitk/info.yml +++ b/microsoft-Phi-3-mini-128k-instruct/aitk/info.yml @@ -31,6 +31,6 @@ recipes: aitk: modelInfo: id: "huggingface/microsoft/Phi-3-mini-128k-instruct" - version: 3 + version: 4 groupId: "huggingface/microsoft/Phi-3-mini-4k-instruct" groupItemName: "128K" diff --git a/microsoft-Phi-3-mini-128k-instruct/aitk/model_project.config b/microsoft-Phi-3-mini-128k-instruct/aitk/model_project.config index 0c3d387d9..5f7bace4b 100644 --- a/microsoft-Phi-3-mini-128k-instruct/aitk/model_project.config +++ b/microsoft-Phi-3-mini-128k-instruct/aitk/model_project.config @@ -23,6 +23,6 @@ ], "modelInfo": { "id": "huggingface/microsoft/Phi-3-mini-128k-instruct", - "version": 3 + "version": 4 } } diff --git a/microsoft-Phi-3-mini-4k-instruct/aitk/info.yml b/microsoft-Phi-3-mini-4k-instruct/aitk/info.yml index 929f51308..2cb5b8909 100644 --- a/microsoft-Phi-3-mini-4k-instruct/aitk/info.yml +++ b/microsoft-Phi-3-mini-4k-instruct/aitk/info.yml @@ -31,6 +31,6 @@ recipes: aitk: modelInfo: id: "huggingface/microsoft/Phi-3-mini-4k-instruct" - version: 3 + version: 4 groupId: "huggingface/microsoft/Phi-3-mini-4k-instruct" groupItemName: "4K" diff --git a/microsoft-Phi-3-mini-4k-instruct/aitk/model_project.config b/microsoft-Phi-3-mini-4k-instruct/aitk/model_project.config index 162dd6b5e..b0707cbf9 100644 --- a/microsoft-Phi-3-mini-4k-instruct/aitk/model_project.config +++ b/microsoft-Phi-3-mini-4k-instruct/aitk/model_project.config @@ -23,6 +23,6 @@ ], "modelInfo": { "id": "huggingface/microsoft/Phi-3-mini-4k-instruct", - "version": 3 + "version": 4 } } diff --git a/microsoft-Phi-3.5-mini-instruct/aitk/info.yml b/microsoft-Phi-3.5-mini-instruct/aitk/info.yml index eba2844ca..9515b0539 100644 --- a/microsoft-Phi-3.5-mini-instruct/aitk/info.yml +++ b/microsoft-Phi-3.5-mini-instruct/aitk/info.yml @@ -42,5 +42,5 @@ recipes: aitk: modelInfo: id: "huggingface/microsoft/Phi-3.5-mini-instruct" - version: 6 + version: 7 p0: true diff --git a/microsoft-Phi-3.5-mini-instruct/aitk/model_project.config b/microsoft-Phi-3.5-mini-instruct/aitk/model_project.config index d5d2fe50b..1162f8288 100644 --- a/microsoft-Phi-3.5-mini-instruct/aitk/model_project.config +++ b/microsoft-Phi-3.5-mini-instruct/aitk/model_project.config @@ -31,6 +31,6 @@ ], "modelInfo": { "id": "huggingface/microsoft/Phi-3.5-mini-instruct", - "version": 6 + "version": 7 } } diff --git a/microsoft-Phi-4-mini-instruct/aitk/info.yml b/microsoft-Phi-4-mini-instruct/aitk/info.yml index b29b4d472..223716329 100644 --- a/microsoft-Phi-4-mini-instruct/aitk/info.yml +++ b/microsoft-Phi-4-mini-instruct/aitk/info.yml @@ -30,4 +30,4 @@ recipes: aitk: modelInfo: id: "huggingface/microsoft/Phi-4-mini-instruct" - version: 3 + version: 4 diff --git a/microsoft-Phi-4-mini-instruct/aitk/model_project.config b/microsoft-Phi-4-mini-instruct/aitk/model_project.config index c0518a8bd..622ae887b 100644 --- a/microsoft-Phi-4-mini-instruct/aitk/model_project.config +++ b/microsoft-Phi-4-mini-instruct/aitk/model_project.config @@ -19,6 +19,6 @@ ], "modelInfo": { "id": "huggingface/microsoft/Phi-4-mini-instruct", - "version": 3 + "version": 4 } } diff --git a/microsoft-Phi-4-mini-reasoning/aitk/info.yml b/microsoft-Phi-4-mini-reasoning/aitk/info.yml index a654cb9c4..c2c48f8cd 100644 --- a/microsoft-Phi-4-mini-reasoning/aitk/info.yml +++ b/microsoft-Phi-4-mini-reasoning/aitk/info.yml @@ -25,4 +25,4 @@ recipes: aitk: modelInfo: id: "huggingface/microsoft/Phi-4-mini-reasoning" - version: 3 + version: 4 diff --git a/microsoft-Phi-4-mini-reasoning/aitk/model_project.config b/microsoft-Phi-4-mini-reasoning/aitk/model_project.config index a43ec476e..5c3c95d39 100644 --- a/microsoft-Phi-4-mini-reasoning/aitk/model_project.config +++ b/microsoft-Phi-4-mini-reasoning/aitk/model_project.config @@ -15,6 +15,6 @@ ], "modelInfo": { "id": "huggingface/microsoft/Phi-4-mini-reasoning", - "version": 3 + "version": 4 } } diff --git a/microsoft-Phi-4-reasoning-plus/aitk/info.yml b/microsoft-Phi-4-reasoning-plus/aitk/info.yml index e01fcbb6d..1ba4e0fc3 100644 --- a/microsoft-Phi-4-reasoning-plus/aitk/info.yml +++ b/microsoft-Phi-4-reasoning-plus/aitk/info.yml @@ -12,4 +12,4 @@ recipes: aitk: modelInfo: id: "huggingface/microsoft/Phi-4-reasoning-plus" - version: 4 + version: 5 diff --git a/microsoft-Phi-4-reasoning-plus/aitk/model_project.config b/microsoft-Phi-4-reasoning-plus/aitk/model_project.config index 6ed0432b7..9f7fd6021 100644 --- a/microsoft-Phi-4-reasoning-plus/aitk/model_project.config +++ b/microsoft-Phi-4-reasoning-plus/aitk/model_project.config @@ -7,6 +7,6 @@ ], "modelInfo": { "id": "huggingface/microsoft/Phi-4-reasoning-plus", - "version": 4 + "version": 5 } } diff --git a/microsoft-Phi-4-reasoning/aitk/info.yml b/microsoft-Phi-4-reasoning/aitk/info.yml index 8e40b4c4b..f4dd44240 100644 --- a/microsoft-Phi-4-reasoning/aitk/info.yml +++ b/microsoft-Phi-4-reasoning/aitk/info.yml @@ -12,4 +12,4 @@ recipes: aitk: modelInfo: id: "huggingface/microsoft/Phi-4-reasoning" - version: 4 + version: 5 diff --git a/microsoft-Phi-4-reasoning/aitk/model_project.config b/microsoft-Phi-4-reasoning/aitk/model_project.config index fee40ac23..e35595661 100644 --- a/microsoft-Phi-4-reasoning/aitk/model_project.config +++ b/microsoft-Phi-4-reasoning/aitk/model_project.config @@ -7,6 +7,6 @@ ], "modelInfo": { "id": "huggingface/microsoft/Phi-4-reasoning", - "version": 4 + "version": 5 } } diff --git a/microsoft-Phi-4/aitk/info.yml b/microsoft-Phi-4/aitk/info.yml index c1e0dab03..84d170413 100644 --- a/microsoft-Phi-4/aitk/info.yml +++ b/microsoft-Phi-4/aitk/info.yml @@ -17,4 +17,4 @@ recipes: aitk: modelInfo: id: "huggingface/microsoft/Phi-4" - version: 2 + version: 3 diff --git a/microsoft-Phi-4/aitk/model_project.config b/microsoft-Phi-4/aitk/model_project.config index e90ccdb71..b63c2c8dd 100644 --- a/microsoft-Phi-4/aitk/model_project.config +++ b/microsoft-Phi-4/aitk/model_project.config @@ -11,6 +11,6 @@ ], "modelInfo": { "id": "huggingface/microsoft/Phi-4", - "version": 2 + "version": 3 } } diff --git a/microsoft-resnet-50/aitk/info.yml b/microsoft-resnet-50/aitk/info.yml index fe9387cc5..990b55773 100644 --- a/microsoft-resnet-50/aitk/info.yml +++ b/microsoft-resnet-50/aitk/info.yml @@ -29,7 +29,7 @@ recipes: aitk: modelInfo: id: "huggingface/microsoft/resnet-50" - version: 4 + version: 5 architecture: CNN displayName: "Microsoft/ResNet-50" p0: true diff --git a/microsoft-resnet-50/aitk/model_project.config b/microsoft-resnet-50/aitk/model_project.config index d11ed84be..be2778a56 100644 --- a/microsoft-resnet-50/aitk/model_project.config +++ b/microsoft-resnet-50/aitk/model_project.config @@ -31,6 +31,6 @@ ], "modelInfo": { "id": "huggingface/microsoft/resnet-50", - "version": 4 + "version": 5 } } diff --git a/mistralai-Mistral-7B-Instruct-v0.2/aitk/info.yml b/mistralai-Mistral-7B-Instruct-v0.2/aitk/info.yml index b4ccd40cd..61be7180f 100644 --- a/mistralai-Mistral-7B-Instruct-v0.2/aitk/info.yml +++ b/mistralai-Mistral-7B-Instruct-v0.2/aitk/info.yml @@ -25,4 +25,4 @@ recipes: aitk: modelInfo: id: "huggingface/mistralai/Mistral-7B-Instruct-v0.2" - version: 2 + version: 3 diff --git a/mistralai-Mistral-7B-Instruct-v0.2/aitk/model_project.config b/mistralai-Mistral-7B-Instruct-v0.2/aitk/model_project.config index ba9df7370..c0e0c60a4 100644 --- a/mistralai-Mistral-7B-Instruct-v0.2/aitk/model_project.config +++ b/mistralai-Mistral-7B-Instruct-v0.2/aitk/model_project.config @@ -19,6 +19,6 @@ ], "modelInfo": { "id": "huggingface/mistralai/Mistral-7B-Instruct-v0.2", - "version": 2 + "version": 3 } } diff --git a/mistralai-Mistral-7B-Instruct-v0.3/aitk/info.yml b/mistralai-Mistral-7B-Instruct-v0.3/aitk/info.yml index 30614adfb..ab60daa7d 100644 --- a/mistralai-Mistral-7B-Instruct-v0.3/aitk/info.yml +++ b/mistralai-Mistral-7B-Instruct-v0.3/aitk/info.yml @@ -10,4 +10,4 @@ recipes: aitk: modelInfo: id: "huggingface/mistralai/Mistral-7B-Instruct-v0.3" - version: 3 + version: 4 diff --git a/mistralai-Mistral-7B-Instruct-v0.3/aitk/model_project.config b/mistralai-Mistral-7B-Instruct-v0.3/aitk/model_project.config index 00160ac9b..39f42ae2c 100644 --- a/mistralai-Mistral-7B-Instruct-v0.3/aitk/model_project.config +++ b/mistralai-Mistral-7B-Instruct-v0.3/aitk/model_project.config @@ -7,6 +7,6 @@ ], "modelInfo": { "id": "huggingface/mistralai/Mistral-7B-Instruct-v0.3", - "version": 3 + "version": 4 } } diff --git a/openai-clip-vit-base-patch16/aitk/info.yml b/openai-clip-vit-base-patch16/aitk/info.yml index 633a5133f..1686cc549 100644 --- a/openai-clip-vit-base-patch16/aitk/info.yml +++ b/openai-clip-vit-base-patch16/aitk/info.yml @@ -29,5 +29,5 @@ recipes: aitk: modelInfo: id: "huggingface/openai/clip-vit-base-patch16" - version: 5 + version: 6 p0: true diff --git a/openai-clip-vit-base-patch16/aitk/model_project.config b/openai-clip-vit-base-patch16/aitk/model_project.config index a15e48590..0506a0fd7 100644 --- a/openai-clip-vit-base-patch16/aitk/model_project.config +++ b/openai-clip-vit-base-patch16/aitk/model_project.config @@ -31,6 +31,6 @@ ], "modelInfo": { "id": "huggingface/openai/clip-vit-base-patch16", - "version": 5 + "version": 6 } } diff --git a/openai-clip-vit-base-patch32/aitk/info.yml b/openai-clip-vit-base-patch32/aitk/info.yml index 1f9fa87dc..545b1f463 100644 --- a/openai-clip-vit-base-patch32/aitk/info.yml +++ b/openai-clip-vit-base-patch32/aitk/info.yml @@ -29,5 +29,5 @@ recipes: aitk: modelInfo: id: "huggingface/openai/clip-vit-base-patch32" - version: 5 + version: 6 p0: true diff --git a/openai-clip-vit-base-patch32/aitk/model_project.config b/openai-clip-vit-base-patch32/aitk/model_project.config index 084fa3a91..3932bafd5 100644 --- a/openai-clip-vit-base-patch32/aitk/model_project.config +++ b/openai-clip-vit-base-patch32/aitk/model_project.config @@ -31,6 +31,6 @@ ], "modelInfo": { "id": "huggingface/openai/clip-vit-base-patch32", - "version": 5 + "version": 6 } } diff --git a/openai-clip-vit-large-patch14/aitk/info.yml b/openai-clip-vit-large-patch14/aitk/info.yml index 4613b4eec..a3f61e259 100644 --- a/openai-clip-vit-large-patch14/aitk/info.yml +++ b/openai-clip-vit-large-patch14/aitk/info.yml @@ -26,5 +26,5 @@ recipes: aitk: modelInfo: id: "huggingface/openai/clip-vit-large-patch14" - version: 1 + version: 2 p0: false diff --git a/openai-clip-vit-large-patch14/aitk/model_project.config b/openai-clip-vit-large-patch14/aitk/model_project.config index 1aeccd29e..76479dad6 100644 --- a/openai-clip-vit-large-patch14/aitk/model_project.config +++ b/openai-clip-vit-large-patch14/aitk/model_project.config @@ -27,6 +27,6 @@ ], "modelInfo": { "id": "huggingface/openai/clip-vit-large-patch14", - "version": 1 + "version": 2 } } diff --git a/openai-whisper-large-v3-turbo/aitk/info.yml b/openai-whisper-large-v3-turbo/aitk/info.yml index 6a3845c98..c002f242f 100644 --- a/openai-whisper-large-v3-turbo/aitk/info.yml +++ b/openai-whisper-large-v3-turbo/aitk/info.yml @@ -8,4 +8,4 @@ recipes: aitk: modelInfo: id: "huggingface/openai/whisper-large-v3-turbo" - version: 1 + version: 2 diff --git a/openai-whisper-large-v3-turbo/aitk/model_project.config b/openai-whisper-large-v3-turbo/aitk/model_project.config index bb3a40f19..467c5ec88 100644 --- a/openai-whisper-large-v3-turbo/aitk/model_project.config +++ b/openai-whisper-large-v3-turbo/aitk/model_project.config @@ -7,6 +7,6 @@ ], "modelInfo": { "id": "huggingface/openai/whisper-large-v3-turbo", - "version": 1 + "version": 2 } } diff --git a/sam-vit-base/aitk/info.yml b/sam-vit-base/aitk/info.yml index f520bf85e..3b61c2a26 100644 --- a/sam-vit-base/aitk/info.yml +++ b/sam-vit-base/aitk/info.yml @@ -8,5 +8,5 @@ recipes: aitk: modelInfo: id: "huggingface/facebook/sam-vit-base" - version: 1 + version: 2 status: Hide diff --git a/sam-vit-base/aitk/model_project.config b/sam-vit-base/aitk/model_project.config index d1c1e697b..9a7ada4ef 100644 --- a/sam-vit-base/aitk/model_project.config +++ b/sam-vit-base/aitk/model_project.config @@ -7,6 +7,6 @@ ], "modelInfo": { "id": "huggingface/facebook/sam-vit-base", - "version": 1 + "version": 2 } } diff --git a/sam2.1-hiera-small/aitk/info.yml b/sam2.1-hiera-small/aitk/info.yml index 0b5a7ddb5..0bf543056 100644 --- a/sam2.1-hiera-small/aitk/info.yml +++ b/sam2.1-hiera-small/aitk/info.yml @@ -8,5 +8,5 @@ recipes: aitk: modelInfo: id: "huggingface/facebook/sam2.1-hiera-small" - version: 1 + version: 2 status: Hide diff --git a/sam2.1-hiera-small/aitk/model_project.config b/sam2.1-hiera-small/aitk/model_project.config index 156824e9c..73807cb65 100644 --- a/sam2.1-hiera-small/aitk/model_project.config +++ b/sam2.1-hiera-small/aitk/model_project.config @@ -7,6 +7,6 @@ ], "modelInfo": { "id": "huggingface/facebook/sam2.1-hiera-small", - "version": 1 + "version": 2 } } diff --git a/sd-legacy-stable-diffusion-v1-5/aitk/info.yml b/sd-legacy-stable-diffusion-v1-5/aitk/info.yml index 94c877b2f..5aa98fedd 100644 --- a/sd-legacy-stable-diffusion-v1-5/aitk/info.yml +++ b/sd-legacy-stable-diffusion-v1-5/aitk/info.yml @@ -13,4 +13,4 @@ recipes: aitk: modelInfo: id: "huggingface/stable-diffusion-v1-5/stable-diffusion-v1-5" - version: 2 + version: 3 diff --git a/sd-legacy-stable-diffusion-v1-5/aitk/model_project.config b/sd-legacy-stable-diffusion-v1-5/aitk/model_project.config index 76f1b931c..fa3f086dd 100644 --- a/sd-legacy-stable-diffusion-v1-5/aitk/model_project.config +++ b/sd-legacy-stable-diffusion-v1-5/aitk/model_project.config @@ -11,6 +11,6 @@ ], "modelInfo": { "id": "huggingface/stable-diffusion-v1-5/stable-diffusion-v1-5", - "version": 2 + "version": 3 } } diff --git a/sd2-community-stable-diffusion-2-1/aitk/info.yml b/sd2-community-stable-diffusion-2-1/aitk/info.yml index 0ad1d9a03..f3128a186 100644 --- a/sd2-community-stable-diffusion-2-1/aitk/info.yml +++ b/sd2-community-stable-diffusion-2-1/aitk/info.yml @@ -13,5 +13,5 @@ recipes: aitk: modelInfo: id: "huggingface/sd2-community/stable-diffusion-2-1" - version: 1 + version: 2 status: Hide diff --git a/sd2-community-stable-diffusion-2-1/aitk/model_project.config b/sd2-community-stable-diffusion-2-1/aitk/model_project.config index b0f437198..0b6de725b 100644 --- a/sd2-community-stable-diffusion-2-1/aitk/model_project.config +++ b/sd2-community-stable-diffusion-2-1/aitk/model_project.config @@ -11,6 +11,6 @@ ], "modelInfo": { "id": "huggingface/sd2-community/stable-diffusion-2-1", - "version": 1 + "version": 2 } } From b33c050b2a99c2d71d72e54ab0678a8b771515c3 Mon Sep 17 00:00:00 2001 From: hualxie Date: Fri, 24 Apr 2026 15:00:02 +0800 Subject: [PATCH 09/12] update inference_sample --- .aitk/scripts/sanitize/file_validation.py | 2 ++ .aitk/scripts/sanitize/main.py | 1 + .../aitk/winml.py | 22 +++++++++---------- .../aitk/inference_sample.ipynb | 18 +-------------- Qwen-Qwen2.5-0.5B-Instruct/aitk/winml.py | 22 +++++++++---------- Qwen-Qwen2.5-0.5B/aitk/inference_sample.ipynb | 18 +-------------- Qwen-Qwen2.5-0.5B/aitk/winml.py | 22 +++++++++---------- .../aitk/inference_sample.ipynb | 18 +-------------- Qwen-Qwen2.5-1.5B-Instruct/aitk/winml.py | 22 +++++++++---------- .../aitk/inference_sample.ipynb | 18 +-------------- Qwen-Qwen2.5-14B-Instruct/aitk/winml.py | 22 +++++++++---------- .../aitk/inference_sample.ipynb | 18 +-------------- Qwen-Qwen2.5-3B-Instruct/aitk/winml.py | 22 +++++++++---------- .../aitk/inference_sample.ipynb | 18 +-------------- Qwen-Qwen2.5-7B-Instruct/aitk/winml.py | 22 +++++++++---------- .../aitk/inference_sample.ipynb | 18 +-------------- .../aitk/winml.py | 22 +++++++++---------- .../aitk/inference_sample.ipynb | 18 +-------------- .../aitk/winml.py | 22 +++++++++---------- .../aitk/inference_sample.ipynb | 18 +-------------- Qwen-Qwen2.5-Coder-14B-Instruct/aitk/winml.py | 22 +++++++++---------- .../aitk/inference_sample.ipynb | 18 +-------------- Qwen-Qwen2.5-Coder-3B-Instruct/aitk/winml.py | 22 +++++++++---------- .../aitk/inference_sample.ipynb | 18 +-------------- Qwen-Qwen2.5-Coder-7B-Instruct/aitk/winml.py | 22 +++++++++---------- .../aitk/inference_sample.ipynb | 18 +-------------- .../aitk/winml.py | 22 +++++++++---------- .../aitk/_copy.json.config | 7 +----- .../aitk/inference_sample.ipynb | 18 +-------------- .../aitk/winml.py | 22 +++++++++---------- .../aitk/inference_sample.ipynb | 18 +-------------- .../aitk/winml.py | 22 +++++++++---------- .../aitk/inference_sample.ipynb | 18 +-------------- .../aitk/winml.py | 22 +++++++++---------- .../aitk/inference_sample.ipynb | 18 +-------------- .../aitk/winml.py | 22 +++++++++---------- .../aitk/inference_sample.ipynb | 18 +-------------- google-vit-base-patch16-224/aitk/winml.py | 22 +++++++++---------- .../aitk/inference_sample.ipynb | 18 +-------------- intel-bert-base-uncased-mrpc/aitk/winml.py | 22 +++++++++---------- .../aitk/inference_sample.ipynb | 18 +-------------- .../aitk/winml.py | 22 +++++++++---------- .../aitk/inference_sample.ipynb | 18 +-------------- .../aitk/winml.py | 22 +++++++++---------- .../aitk/inference_sample.ipynb | 18 +-------------- .../aitk/winml.py | 22 +++++++++---------- .../aitk/inference_sample.ipynb | 18 +-------------- .../aitk/winml.py | 22 +++++++++---------- .../aitk/inference_sample.ipynb | 18 +-------------- .../aitk/winml.py | 22 +++++++++---------- .../aitk/inference_sample.ipynb | 18 +-------------- microsoft-Phi-3.5-mini-instruct/aitk/winml.py | 22 +++++++++---------- .../aitk/inference_sample.ipynb | 18 +-------------- microsoft-Phi-4-mini-instruct/aitk/winml.py | 22 +++++++++---------- .../aitk/inference_sample.ipynb | 18 +-------------- microsoft-Phi-4-mini-reasoning/aitk/winml.py | 22 +++++++++---------- .../aitk/inference_sample.ipynb | 18 +-------------- microsoft-Phi-4-reasoning-plus/aitk/winml.py | 22 +++++++++---------- .../aitk/inference_sample.ipynb | 18 +-------------- microsoft-Phi-4-reasoning/aitk/winml.py | 22 +++++++++---------- microsoft-Phi-4/aitk/inference_sample.ipynb | 18 +-------------- microsoft-Phi-4/aitk/winml.py | 22 +++++++++---------- .../aitk/inference_sample.ipynb | 18 +-------------- microsoft-resnet-50/aitk/winml.py | 22 +++++++++---------- .../aitk/inference_sample.ipynb | 18 +-------------- .../aitk/winml.py | 22 +++++++++---------- .../aitk/inference_sample.ipynb | 18 +-------------- .../aitk/winml.py | 22 +++++++++---------- .../aitk/inference_sample.ipynb | 18 +-------------- openai-clip-vit-base-patch16/aitk/winml.py | 22 +++++++++---------- .../aitk/inference_sample.ipynb | 18 +-------------- openai-clip-vit-base-patch32/aitk/winml.py | 22 +++++++++---------- .../aitk/inference_sample.ipynb | 18 +-------------- openai-clip-vit-large-patch14/aitk/winml.py | 22 +++++++++---------- openai-whisper-large-v3-turbo/aitk/winml.py | 22 +++++++++---------- sam-vit-base/aitk/inference_sample.ipynb | 19 +--------------- sam-vit-base/aitk/winml.py | 22 +++++++++---------- .../aitk/inference_sample.ipynb | 19 +--------------- sam2.1-hiera-small/aitk/winml.py | 22 +++++++++---------- .../sd_ov_workflow_inference_sample.ipynb | 19 +--------------- .../sd_qnn_workflow_inference_sample.ipynb | 19 +--------------- sd-legacy-stable-diffusion-v1-5/aitk/winml.py | 22 +++++++++---------- .../sd_ov_workflow_inference_sample.ipynb | 19 +--------------- .../sd_qnn_workflow_inference_sample.ipynb | 19 +--------------- .../aitk/winml.py | 22 +++++++++---------- 85 files changed, 455 insertions(+), 1201 deletions(-) diff --git a/.aitk/scripts/sanitize/file_validation.py b/.aitk/scripts/sanitize/file_validation.py index e06d73565..fa87e3fa9 100644 --- a/.aitk/scripts/sanitize/file_validation.py +++ b/.aitk/scripts/sanitize/file_validation.py @@ -163,6 +163,8 @@ def readCheckIpynb(ipynbFile: str, modelItems: dict[str, ModelParameter]): with open_ex(ipynbFile, "r") as file: ipynbContent: str = file.read() + if "winml.py" in ipynbContent: + printError(f"{ipynbFile} should not reference 'winml.py'. It is old code") allRuntimes: set[str] = set() for name, modelParameter in modelItems.items(): if modelParameter.runtime == None: diff --git a/.aitk/scripts/sanitize/main.py b/.aitk/scripts/sanitize/main.py index c05d5d50e..75cb4b9ed 100644 --- a/.aitk/scripts/sanitize/main.py +++ b/.aitk/scripts/sanitize/main.py @@ -24,6 +24,7 @@ # Typically contains the canonical source of winml.py that others copy from. WINML_COPY_EXEMPT_IDS = { "huggingface/Intel/bert-base-uncased-mrpc", + "huggingface/deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B" } diff --git a/OFA-Sys-chinese-clip-vit-base-patch16/aitk/winml.py b/OFA-Sys-chinese-clip-vit-base-patch16/aitk/winml.py index febad5a30..4310b7cfb 100644 --- a/OFA-Sys-chinese-clip-vit-base-patch16/aitk/winml.py +++ b/OFA-Sys-chinese-clip-vit-base-patch16/aitk/winml.py @@ -1,15 +1,13 @@ -import json - -def _get_ep_paths() -> dict[str, str]: +def register_execution_providers(): from windowsml import EpCatalog - eps = {} + import onnxruntime as ort + with EpCatalog() as catalog: for ep in catalog.find_all_providers(): - # Ensure the provider is ready (downloads/installs if needed) - ep.ensure_ready() - eps[ep.name] = ep.library_path - return eps - -if __name__ == "__main__": - eps = _get_ep_paths() - print(json.dumps(eps)) + try: + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + ort.register_execution_provider_library(ep.name, ep.library_path) + print(f"Successfully registered execution provider {ep.name} from {ep.library_path}") + except Exception as e: + print(f"Failed to register execution provider {ep.name} from {ep.library_path}: {e}") diff --git a/Qwen-Qwen2.5-0.5B-Instruct/aitk/inference_sample.ipynb b/Qwen-Qwen2.5-0.5B-Instruct/aitk/inference_sample.ipynb index 4ae517728..6eccd0672 100644 --- a/Qwen-Qwen2.5-0.5B-Instruct/aitk/inference_sample.ipynb +++ b/Qwen-Qwen2.5-0.5B-Instruct/aitk/inference_sample.ipynb @@ -17,23 +17,7 @@ "metadata": {}, "outputs": [], "source": [ - "# reference: https://learn.microsoft.com/en-us/windows/ai/new-windows-ml/tutorial?tabs=python#acquiring-the-model-and-preprocessing\n", - "import subprocess\n", - "import json\n", - "import sys\n", - "import os\n", - "import onnxruntime_genai as og\n", - "\n", - "def register_execution_providers():\n", - " worker_script = os.path.abspath('winml.py')\n", - " result = subprocess.check_output([sys.executable, worker_script], text=True)\n", - " paths = json.loads(result)\n", - " for item in paths.items():\n", - " try:\n", - " og.register_execution_provider_library(item[0], item[1])\n", - " except Exception as e:\n", - " print(f\"Failed to register execution provider {item[0]}: {e}\")\n", - "\n", + "from winml import register_execution_providers\n", "register_execution_providers()" ] }, diff --git a/Qwen-Qwen2.5-0.5B-Instruct/aitk/winml.py b/Qwen-Qwen2.5-0.5B-Instruct/aitk/winml.py index febad5a30..4310b7cfb 100644 --- a/Qwen-Qwen2.5-0.5B-Instruct/aitk/winml.py +++ b/Qwen-Qwen2.5-0.5B-Instruct/aitk/winml.py @@ -1,15 +1,13 @@ -import json - -def _get_ep_paths() -> dict[str, str]: +def register_execution_providers(): from windowsml import EpCatalog - eps = {} + import onnxruntime as ort + with EpCatalog() as catalog: for ep in catalog.find_all_providers(): - # Ensure the provider is ready (downloads/installs if needed) - ep.ensure_ready() - eps[ep.name] = ep.library_path - return eps - -if __name__ == "__main__": - eps = _get_ep_paths() - print(json.dumps(eps)) + try: + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + ort.register_execution_provider_library(ep.name, ep.library_path) + print(f"Successfully registered execution provider {ep.name} from {ep.library_path}") + except Exception as e: + print(f"Failed to register execution provider {ep.name} from {ep.library_path}: {e}") diff --git a/Qwen-Qwen2.5-0.5B/aitk/inference_sample.ipynb b/Qwen-Qwen2.5-0.5B/aitk/inference_sample.ipynb index 4ae517728..6eccd0672 100644 --- a/Qwen-Qwen2.5-0.5B/aitk/inference_sample.ipynb +++ b/Qwen-Qwen2.5-0.5B/aitk/inference_sample.ipynb @@ -17,23 +17,7 @@ "metadata": {}, "outputs": [], "source": [ - "# reference: https://learn.microsoft.com/en-us/windows/ai/new-windows-ml/tutorial?tabs=python#acquiring-the-model-and-preprocessing\n", - "import subprocess\n", - "import json\n", - "import sys\n", - "import os\n", - "import onnxruntime_genai as og\n", - "\n", - "def register_execution_providers():\n", - " worker_script = os.path.abspath('winml.py')\n", - " result = subprocess.check_output([sys.executable, worker_script], text=True)\n", - " paths = json.loads(result)\n", - " for item in paths.items():\n", - " try:\n", - " og.register_execution_provider_library(item[0], item[1])\n", - " except Exception as e:\n", - " print(f\"Failed to register execution provider {item[0]}: {e}\")\n", - "\n", + "from winml import register_execution_providers\n", "register_execution_providers()" ] }, diff --git a/Qwen-Qwen2.5-0.5B/aitk/winml.py b/Qwen-Qwen2.5-0.5B/aitk/winml.py index febad5a30..4310b7cfb 100644 --- a/Qwen-Qwen2.5-0.5B/aitk/winml.py +++ b/Qwen-Qwen2.5-0.5B/aitk/winml.py @@ -1,15 +1,13 @@ -import json - -def _get_ep_paths() -> dict[str, str]: +def register_execution_providers(): from windowsml import EpCatalog - eps = {} + import onnxruntime as ort + with EpCatalog() as catalog: for ep in catalog.find_all_providers(): - # Ensure the provider is ready (downloads/installs if needed) - ep.ensure_ready() - eps[ep.name] = ep.library_path - return eps - -if __name__ == "__main__": - eps = _get_ep_paths() - print(json.dumps(eps)) + try: + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + ort.register_execution_provider_library(ep.name, ep.library_path) + print(f"Successfully registered execution provider {ep.name} from {ep.library_path}") + except Exception as e: + print(f"Failed to register execution provider {ep.name} from {ep.library_path}: {e}") diff --git a/Qwen-Qwen2.5-1.5B-Instruct/aitk/inference_sample.ipynb b/Qwen-Qwen2.5-1.5B-Instruct/aitk/inference_sample.ipynb index 0b89a098b..2d4b94b3e 100644 --- a/Qwen-Qwen2.5-1.5B-Instruct/aitk/inference_sample.ipynb +++ b/Qwen-Qwen2.5-1.5B-Instruct/aitk/inference_sample.ipynb @@ -17,23 +17,7 @@ "metadata": {}, "outputs": [], "source": [ - "# reference: https://learn.microsoft.com/en-us/windows/ai/new-windows-ml/tutorial?tabs=python#acquiring-the-model-and-preprocessing\n", - "import subprocess\n", - "import json\n", - "import sys\n", - "import os\n", - "import onnxruntime_genai as og\n", - "\n", - "def register_execution_providers():\n", - " worker_script = os.path.abspath('winml.py')\n", - " result = subprocess.check_output([sys.executable, worker_script], text=True)\n", - " paths = json.loads(result)\n", - " for item in paths.items():\n", - " try:\n", - " og.register_execution_provider_library(item[0], item[1])\n", - " except Exception as e:\n", - " print(f\"Failed to register execution provider {item[0]}: {e}\")\n", - "\n", + "from winml import register_execution_providers\n", "register_execution_providers()" ] }, diff --git a/Qwen-Qwen2.5-1.5B-Instruct/aitk/winml.py b/Qwen-Qwen2.5-1.5B-Instruct/aitk/winml.py index febad5a30..4310b7cfb 100644 --- a/Qwen-Qwen2.5-1.5B-Instruct/aitk/winml.py +++ b/Qwen-Qwen2.5-1.5B-Instruct/aitk/winml.py @@ -1,15 +1,13 @@ -import json - -def _get_ep_paths() -> dict[str, str]: +def register_execution_providers(): from windowsml import EpCatalog - eps = {} + import onnxruntime as ort + with EpCatalog() as catalog: for ep in catalog.find_all_providers(): - # Ensure the provider is ready (downloads/installs if needed) - ep.ensure_ready() - eps[ep.name] = ep.library_path - return eps - -if __name__ == "__main__": - eps = _get_ep_paths() - print(json.dumps(eps)) + try: + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + ort.register_execution_provider_library(ep.name, ep.library_path) + print(f"Successfully registered execution provider {ep.name} from {ep.library_path}") + except Exception as e: + print(f"Failed to register execution provider {ep.name} from {ep.library_path}: {e}") diff --git a/Qwen-Qwen2.5-14B-Instruct/aitk/inference_sample.ipynb b/Qwen-Qwen2.5-14B-Instruct/aitk/inference_sample.ipynb index 4ae517728..6eccd0672 100644 --- a/Qwen-Qwen2.5-14B-Instruct/aitk/inference_sample.ipynb +++ b/Qwen-Qwen2.5-14B-Instruct/aitk/inference_sample.ipynb @@ -17,23 +17,7 @@ "metadata": {}, "outputs": [], "source": [ - "# reference: https://learn.microsoft.com/en-us/windows/ai/new-windows-ml/tutorial?tabs=python#acquiring-the-model-and-preprocessing\n", - "import subprocess\n", - "import json\n", - "import sys\n", - "import os\n", - "import onnxruntime_genai as og\n", - "\n", - "def register_execution_providers():\n", - " worker_script = os.path.abspath('winml.py')\n", - " result = subprocess.check_output([sys.executable, worker_script], text=True)\n", - " paths = json.loads(result)\n", - " for item in paths.items():\n", - " try:\n", - " og.register_execution_provider_library(item[0], item[1])\n", - " except Exception as e:\n", - " print(f\"Failed to register execution provider {item[0]}: {e}\")\n", - "\n", + "from winml import register_execution_providers\n", "register_execution_providers()" ] }, diff --git a/Qwen-Qwen2.5-14B-Instruct/aitk/winml.py b/Qwen-Qwen2.5-14B-Instruct/aitk/winml.py index febad5a30..4310b7cfb 100644 --- a/Qwen-Qwen2.5-14B-Instruct/aitk/winml.py +++ b/Qwen-Qwen2.5-14B-Instruct/aitk/winml.py @@ -1,15 +1,13 @@ -import json - -def _get_ep_paths() -> dict[str, str]: +def register_execution_providers(): from windowsml import EpCatalog - eps = {} + import onnxruntime as ort + with EpCatalog() as catalog: for ep in catalog.find_all_providers(): - # Ensure the provider is ready (downloads/installs if needed) - ep.ensure_ready() - eps[ep.name] = ep.library_path - return eps - -if __name__ == "__main__": - eps = _get_ep_paths() - print(json.dumps(eps)) + try: + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + ort.register_execution_provider_library(ep.name, ep.library_path) + print(f"Successfully registered execution provider {ep.name} from {ep.library_path}") + except Exception as e: + print(f"Failed to register execution provider {ep.name} from {ep.library_path}: {e}") diff --git a/Qwen-Qwen2.5-3B-Instruct/aitk/inference_sample.ipynb b/Qwen-Qwen2.5-3B-Instruct/aitk/inference_sample.ipynb index 4ae517728..6eccd0672 100644 --- a/Qwen-Qwen2.5-3B-Instruct/aitk/inference_sample.ipynb +++ b/Qwen-Qwen2.5-3B-Instruct/aitk/inference_sample.ipynb @@ -17,23 +17,7 @@ "metadata": {}, "outputs": [], "source": [ - "# reference: https://learn.microsoft.com/en-us/windows/ai/new-windows-ml/tutorial?tabs=python#acquiring-the-model-and-preprocessing\n", - "import subprocess\n", - "import json\n", - "import sys\n", - "import os\n", - "import onnxruntime_genai as og\n", - "\n", - "def register_execution_providers():\n", - " worker_script = os.path.abspath('winml.py')\n", - " result = subprocess.check_output([sys.executable, worker_script], text=True)\n", - " paths = json.loads(result)\n", - " for item in paths.items():\n", - " try:\n", - " og.register_execution_provider_library(item[0], item[1])\n", - " except Exception as e:\n", - " print(f\"Failed to register execution provider {item[0]}: {e}\")\n", - "\n", + "from winml import register_execution_providers\n", "register_execution_providers()" ] }, diff --git a/Qwen-Qwen2.5-3B-Instruct/aitk/winml.py b/Qwen-Qwen2.5-3B-Instruct/aitk/winml.py index febad5a30..4310b7cfb 100644 --- a/Qwen-Qwen2.5-3B-Instruct/aitk/winml.py +++ b/Qwen-Qwen2.5-3B-Instruct/aitk/winml.py @@ -1,15 +1,13 @@ -import json - -def _get_ep_paths() -> dict[str, str]: +def register_execution_providers(): from windowsml import EpCatalog - eps = {} + import onnxruntime as ort + with EpCatalog() as catalog: for ep in catalog.find_all_providers(): - # Ensure the provider is ready (downloads/installs if needed) - ep.ensure_ready() - eps[ep.name] = ep.library_path - return eps - -if __name__ == "__main__": - eps = _get_ep_paths() - print(json.dumps(eps)) + try: + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + ort.register_execution_provider_library(ep.name, ep.library_path) + print(f"Successfully registered execution provider {ep.name} from {ep.library_path}") + except Exception as e: + print(f"Failed to register execution provider {ep.name} from {ep.library_path}: {e}") diff --git a/Qwen-Qwen2.5-7B-Instruct/aitk/inference_sample.ipynb b/Qwen-Qwen2.5-7B-Instruct/aitk/inference_sample.ipynb index 4ae517728..6eccd0672 100644 --- a/Qwen-Qwen2.5-7B-Instruct/aitk/inference_sample.ipynb +++ b/Qwen-Qwen2.5-7B-Instruct/aitk/inference_sample.ipynb @@ -17,23 +17,7 @@ "metadata": {}, "outputs": [], "source": [ - "# reference: https://learn.microsoft.com/en-us/windows/ai/new-windows-ml/tutorial?tabs=python#acquiring-the-model-and-preprocessing\n", - "import subprocess\n", - "import json\n", - "import sys\n", - "import os\n", - "import onnxruntime_genai as og\n", - "\n", - "def register_execution_providers():\n", - " worker_script = os.path.abspath('winml.py')\n", - " result = subprocess.check_output([sys.executable, worker_script], text=True)\n", - " paths = json.loads(result)\n", - " for item in paths.items():\n", - " try:\n", - " og.register_execution_provider_library(item[0], item[1])\n", - " except Exception as e:\n", - " print(f\"Failed to register execution provider {item[0]}: {e}\")\n", - "\n", + "from winml import register_execution_providers\n", "register_execution_providers()" ] }, diff --git a/Qwen-Qwen2.5-7B-Instruct/aitk/winml.py b/Qwen-Qwen2.5-7B-Instruct/aitk/winml.py index febad5a30..4310b7cfb 100644 --- a/Qwen-Qwen2.5-7B-Instruct/aitk/winml.py +++ b/Qwen-Qwen2.5-7B-Instruct/aitk/winml.py @@ -1,15 +1,13 @@ -import json - -def _get_ep_paths() -> dict[str, str]: +def register_execution_providers(): from windowsml import EpCatalog - eps = {} + import onnxruntime as ort + with EpCatalog() as catalog: for ep in catalog.find_all_providers(): - # Ensure the provider is ready (downloads/installs if needed) - ep.ensure_ready() - eps[ep.name] = ep.library_path - return eps - -if __name__ == "__main__": - eps = _get_ep_paths() - print(json.dumps(eps)) + try: + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + ort.register_execution_provider_library(ep.name, ep.library_path) + print(f"Successfully registered execution provider {ep.name} from {ep.library_path}") + except Exception as e: + print(f"Failed to register execution provider {ep.name} from {ep.library_path}: {e}") diff --git a/Qwen-Qwen2.5-Coder-0.5B-Instruct/aitk/inference_sample.ipynb b/Qwen-Qwen2.5-Coder-0.5B-Instruct/aitk/inference_sample.ipynb index 4ae517728..6eccd0672 100644 --- a/Qwen-Qwen2.5-Coder-0.5B-Instruct/aitk/inference_sample.ipynb +++ b/Qwen-Qwen2.5-Coder-0.5B-Instruct/aitk/inference_sample.ipynb @@ -17,23 +17,7 @@ "metadata": {}, "outputs": [], "source": [ - "# reference: https://learn.microsoft.com/en-us/windows/ai/new-windows-ml/tutorial?tabs=python#acquiring-the-model-and-preprocessing\n", - "import subprocess\n", - "import json\n", - "import sys\n", - "import os\n", - "import onnxruntime_genai as og\n", - "\n", - "def register_execution_providers():\n", - " worker_script = os.path.abspath('winml.py')\n", - " result = subprocess.check_output([sys.executable, worker_script], text=True)\n", - " paths = json.loads(result)\n", - " for item in paths.items():\n", - " try:\n", - " og.register_execution_provider_library(item[0], item[1])\n", - " except Exception as e:\n", - " print(f\"Failed to register execution provider {item[0]}: {e}\")\n", - "\n", + "from winml import register_execution_providers\n", "register_execution_providers()" ] }, diff --git a/Qwen-Qwen2.5-Coder-0.5B-Instruct/aitk/winml.py b/Qwen-Qwen2.5-Coder-0.5B-Instruct/aitk/winml.py index febad5a30..4310b7cfb 100644 --- a/Qwen-Qwen2.5-Coder-0.5B-Instruct/aitk/winml.py +++ b/Qwen-Qwen2.5-Coder-0.5B-Instruct/aitk/winml.py @@ -1,15 +1,13 @@ -import json - -def _get_ep_paths() -> dict[str, str]: +def register_execution_providers(): from windowsml import EpCatalog - eps = {} + import onnxruntime as ort + with EpCatalog() as catalog: for ep in catalog.find_all_providers(): - # Ensure the provider is ready (downloads/installs if needed) - ep.ensure_ready() - eps[ep.name] = ep.library_path - return eps - -if __name__ == "__main__": - eps = _get_ep_paths() - print(json.dumps(eps)) + try: + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + ort.register_execution_provider_library(ep.name, ep.library_path) + print(f"Successfully registered execution provider {ep.name} from {ep.library_path}") + except Exception as e: + print(f"Failed to register execution provider {ep.name} from {ep.library_path}: {e}") diff --git a/Qwen-Qwen2.5-Coder-1.5B-Instruct/aitk/inference_sample.ipynb b/Qwen-Qwen2.5-Coder-1.5B-Instruct/aitk/inference_sample.ipynb index 4ae517728..6eccd0672 100644 --- a/Qwen-Qwen2.5-Coder-1.5B-Instruct/aitk/inference_sample.ipynb +++ b/Qwen-Qwen2.5-Coder-1.5B-Instruct/aitk/inference_sample.ipynb @@ -17,23 +17,7 @@ "metadata": {}, "outputs": [], "source": [ - "# reference: https://learn.microsoft.com/en-us/windows/ai/new-windows-ml/tutorial?tabs=python#acquiring-the-model-and-preprocessing\n", - "import subprocess\n", - "import json\n", - "import sys\n", - "import os\n", - "import onnxruntime_genai as og\n", - "\n", - "def register_execution_providers():\n", - " worker_script = os.path.abspath('winml.py')\n", - " result = subprocess.check_output([sys.executable, worker_script], text=True)\n", - " paths = json.loads(result)\n", - " for item in paths.items():\n", - " try:\n", - " og.register_execution_provider_library(item[0], item[1])\n", - " except Exception as e:\n", - " print(f\"Failed to register execution provider {item[0]}: {e}\")\n", - "\n", + "from winml import register_execution_providers\n", "register_execution_providers()" ] }, diff --git a/Qwen-Qwen2.5-Coder-1.5B-Instruct/aitk/winml.py b/Qwen-Qwen2.5-Coder-1.5B-Instruct/aitk/winml.py index febad5a30..4310b7cfb 100644 --- a/Qwen-Qwen2.5-Coder-1.5B-Instruct/aitk/winml.py +++ b/Qwen-Qwen2.5-Coder-1.5B-Instruct/aitk/winml.py @@ -1,15 +1,13 @@ -import json - -def _get_ep_paths() -> dict[str, str]: +def register_execution_providers(): from windowsml import EpCatalog - eps = {} + import onnxruntime as ort + with EpCatalog() as catalog: for ep in catalog.find_all_providers(): - # Ensure the provider is ready (downloads/installs if needed) - ep.ensure_ready() - eps[ep.name] = ep.library_path - return eps - -if __name__ == "__main__": - eps = _get_ep_paths() - print(json.dumps(eps)) + try: + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + ort.register_execution_provider_library(ep.name, ep.library_path) + print(f"Successfully registered execution provider {ep.name} from {ep.library_path}") + except Exception as e: + print(f"Failed to register execution provider {ep.name} from {ep.library_path}: {e}") diff --git a/Qwen-Qwen2.5-Coder-14B-Instruct/aitk/inference_sample.ipynb b/Qwen-Qwen2.5-Coder-14B-Instruct/aitk/inference_sample.ipynb index 4ae517728..6eccd0672 100644 --- a/Qwen-Qwen2.5-Coder-14B-Instruct/aitk/inference_sample.ipynb +++ b/Qwen-Qwen2.5-Coder-14B-Instruct/aitk/inference_sample.ipynb @@ -17,23 +17,7 @@ "metadata": {}, "outputs": [], "source": [ - "# reference: https://learn.microsoft.com/en-us/windows/ai/new-windows-ml/tutorial?tabs=python#acquiring-the-model-and-preprocessing\n", - "import subprocess\n", - "import json\n", - "import sys\n", - "import os\n", - "import onnxruntime_genai as og\n", - "\n", - "def register_execution_providers():\n", - " worker_script = os.path.abspath('winml.py')\n", - " result = subprocess.check_output([sys.executable, worker_script], text=True)\n", - " paths = json.loads(result)\n", - " for item in paths.items():\n", - " try:\n", - " og.register_execution_provider_library(item[0], item[1])\n", - " except Exception as e:\n", - " print(f\"Failed to register execution provider {item[0]}: {e}\")\n", - "\n", + "from winml import register_execution_providers\n", "register_execution_providers()" ] }, diff --git a/Qwen-Qwen2.5-Coder-14B-Instruct/aitk/winml.py b/Qwen-Qwen2.5-Coder-14B-Instruct/aitk/winml.py index febad5a30..4310b7cfb 100644 --- a/Qwen-Qwen2.5-Coder-14B-Instruct/aitk/winml.py +++ b/Qwen-Qwen2.5-Coder-14B-Instruct/aitk/winml.py @@ -1,15 +1,13 @@ -import json - -def _get_ep_paths() -> dict[str, str]: +def register_execution_providers(): from windowsml import EpCatalog - eps = {} + import onnxruntime as ort + with EpCatalog() as catalog: for ep in catalog.find_all_providers(): - # Ensure the provider is ready (downloads/installs if needed) - ep.ensure_ready() - eps[ep.name] = ep.library_path - return eps - -if __name__ == "__main__": - eps = _get_ep_paths() - print(json.dumps(eps)) + try: + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + ort.register_execution_provider_library(ep.name, ep.library_path) + print(f"Successfully registered execution provider {ep.name} from {ep.library_path}") + except Exception as e: + print(f"Failed to register execution provider {ep.name} from {ep.library_path}: {e}") diff --git a/Qwen-Qwen2.5-Coder-3B-Instruct/aitk/inference_sample.ipynb b/Qwen-Qwen2.5-Coder-3B-Instruct/aitk/inference_sample.ipynb index 4ae517728..6eccd0672 100644 --- a/Qwen-Qwen2.5-Coder-3B-Instruct/aitk/inference_sample.ipynb +++ b/Qwen-Qwen2.5-Coder-3B-Instruct/aitk/inference_sample.ipynb @@ -17,23 +17,7 @@ "metadata": {}, "outputs": [], "source": [ - "# reference: https://learn.microsoft.com/en-us/windows/ai/new-windows-ml/tutorial?tabs=python#acquiring-the-model-and-preprocessing\n", - "import subprocess\n", - "import json\n", - "import sys\n", - "import os\n", - "import onnxruntime_genai as og\n", - "\n", - "def register_execution_providers():\n", - " worker_script = os.path.abspath('winml.py')\n", - " result = subprocess.check_output([sys.executable, worker_script], text=True)\n", - " paths = json.loads(result)\n", - " for item in paths.items():\n", - " try:\n", - " og.register_execution_provider_library(item[0], item[1])\n", - " except Exception as e:\n", - " print(f\"Failed to register execution provider {item[0]}: {e}\")\n", - "\n", + "from winml import register_execution_providers\n", "register_execution_providers()" ] }, diff --git a/Qwen-Qwen2.5-Coder-3B-Instruct/aitk/winml.py b/Qwen-Qwen2.5-Coder-3B-Instruct/aitk/winml.py index febad5a30..4310b7cfb 100644 --- a/Qwen-Qwen2.5-Coder-3B-Instruct/aitk/winml.py +++ b/Qwen-Qwen2.5-Coder-3B-Instruct/aitk/winml.py @@ -1,15 +1,13 @@ -import json - -def _get_ep_paths() -> dict[str, str]: +def register_execution_providers(): from windowsml import EpCatalog - eps = {} + import onnxruntime as ort + with EpCatalog() as catalog: for ep in catalog.find_all_providers(): - # Ensure the provider is ready (downloads/installs if needed) - ep.ensure_ready() - eps[ep.name] = ep.library_path - return eps - -if __name__ == "__main__": - eps = _get_ep_paths() - print(json.dumps(eps)) + try: + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + ort.register_execution_provider_library(ep.name, ep.library_path) + print(f"Successfully registered execution provider {ep.name} from {ep.library_path}") + except Exception as e: + print(f"Failed to register execution provider {ep.name} from {ep.library_path}: {e}") diff --git a/Qwen-Qwen2.5-Coder-7B-Instruct/aitk/inference_sample.ipynb b/Qwen-Qwen2.5-Coder-7B-Instruct/aitk/inference_sample.ipynb index 4ae517728..6eccd0672 100644 --- a/Qwen-Qwen2.5-Coder-7B-Instruct/aitk/inference_sample.ipynb +++ b/Qwen-Qwen2.5-Coder-7B-Instruct/aitk/inference_sample.ipynb @@ -17,23 +17,7 @@ "metadata": {}, "outputs": [], "source": [ - "# reference: https://learn.microsoft.com/en-us/windows/ai/new-windows-ml/tutorial?tabs=python#acquiring-the-model-and-preprocessing\n", - "import subprocess\n", - "import json\n", - "import sys\n", - "import os\n", - "import onnxruntime_genai as og\n", - "\n", - "def register_execution_providers():\n", - " worker_script = os.path.abspath('winml.py')\n", - " result = subprocess.check_output([sys.executable, worker_script], text=True)\n", - " paths = json.loads(result)\n", - " for item in paths.items():\n", - " try:\n", - " og.register_execution_provider_library(item[0], item[1])\n", - " except Exception as e:\n", - " print(f\"Failed to register execution provider {item[0]}: {e}\")\n", - "\n", + "from winml import register_execution_providers\n", "register_execution_providers()" ] }, diff --git a/Qwen-Qwen2.5-Coder-7B-Instruct/aitk/winml.py b/Qwen-Qwen2.5-Coder-7B-Instruct/aitk/winml.py index febad5a30..4310b7cfb 100644 --- a/Qwen-Qwen2.5-Coder-7B-Instruct/aitk/winml.py +++ b/Qwen-Qwen2.5-Coder-7B-Instruct/aitk/winml.py @@ -1,15 +1,13 @@ -import json - -def _get_ep_paths() -> dict[str, str]: +def register_execution_providers(): from windowsml import EpCatalog - eps = {} + import onnxruntime as ort + with EpCatalog() as catalog: for ep in catalog.find_all_providers(): - # Ensure the provider is ready (downloads/installs if needed) - ep.ensure_ready() - eps[ep.name] = ep.library_path - return eps - -if __name__ == "__main__": - eps = _get_ep_paths() - print(json.dumps(eps)) + try: + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + ort.register_execution_provider_library(ep.name, ep.library_path) + print(f"Successfully registered execution provider {ep.name} from {ep.library_path}") + except Exception as e: + print(f"Failed to register execution provider {ep.name} from {ep.library_path}: {e}") diff --git a/deepseek-ai-DeepSeek-R1-Distill-Llama-8B/aitk/inference_sample.ipynb b/deepseek-ai-DeepSeek-R1-Distill-Llama-8B/aitk/inference_sample.ipynb index 5a08fd0e0..ab5016437 100644 --- a/deepseek-ai-DeepSeek-R1-Distill-Llama-8B/aitk/inference_sample.ipynb +++ b/deepseek-ai-DeepSeek-R1-Distill-Llama-8B/aitk/inference_sample.ipynb @@ -17,23 +17,7 @@ "metadata": {}, "outputs": [], "source": [ - "# reference: https://learn.microsoft.com/en-us/windows/ai/new-windows-ml/tutorial?tabs=python#acquiring-the-model-and-preprocessing\n", - "import subprocess\n", - "import json\n", - "import sys\n", - "import os\n", - "import onnxruntime_genai as og\n", - "\n", - "def register_execution_providers():\n", - " worker_script = os.path.abspath('winml.py')\n", - " result = subprocess.check_output([sys.executable, worker_script], text=True)\n", - " paths = json.loads(result)\n", - " for item in paths.items():\n", - " try:\n", - " og.register_execution_provider_library(item[0], item[1])\n", - " except Exception as e:\n", - " print(f\"Failed to register execution provider {item[0]}: {e}\")\n", - "\n", + "from winml import register_execution_providers\n", "register_execution_providers()" ] }, diff --git a/deepseek-ai-DeepSeek-R1-Distill-Llama-8B/aitk/winml.py b/deepseek-ai-DeepSeek-R1-Distill-Llama-8B/aitk/winml.py index febad5a30..4310b7cfb 100644 --- a/deepseek-ai-DeepSeek-R1-Distill-Llama-8B/aitk/winml.py +++ b/deepseek-ai-DeepSeek-R1-Distill-Llama-8B/aitk/winml.py @@ -1,15 +1,13 @@ -import json - -def _get_ep_paths() -> dict[str, str]: +def register_execution_providers(): from windowsml import EpCatalog - eps = {} + import onnxruntime as ort + with EpCatalog() as catalog: for ep in catalog.find_all_providers(): - # Ensure the provider is ready (downloads/installs if needed) - ep.ensure_ready() - eps[ep.name] = ep.library_path - return eps - -if __name__ == "__main__": - eps = _get_ep_paths() - print(json.dumps(eps)) + try: + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + ort.register_execution_provider_library(ep.name, ep.library_path) + print(f"Successfully registered execution provider {ep.name} from {ep.library_path}") + except Exception as e: + print(f"Failed to register execution provider {ep.name} from {ep.library_path}: {e}") diff --git a/deepseek-ai-DeepSeek-R1-Distill-Qwen-1.5B/aitk/_copy.json.config b/deepseek-ai-DeepSeek-R1-Distill-Qwen-1.5B/aitk/_copy.json.config index 6fd21fb1d..f2849d7e7 100644 --- a/deepseek-ai-DeepSeek-R1-Distill-Qwen-1.5B/aitk/_copy.json.config +++ b/deepseek-ai-DeepSeek-R1-Distill-Qwen-1.5B/aitk/_copy.json.config @@ -1,8 +1,3 @@ { - "copies": [ - { - "src": "../../intel-bert-base-uncased-mrpc/aitk/winml.py", - "dst": "winml.py" - } - ] + "copies": [] } diff --git a/deepseek-ai-DeepSeek-R1-Distill-Qwen-1.5B/aitk/inference_sample.ipynb b/deepseek-ai-DeepSeek-R1-Distill-Qwen-1.5B/aitk/inference_sample.ipynb index 501b606c4..b55da50e5 100644 --- a/deepseek-ai-DeepSeek-R1-Distill-Qwen-1.5B/aitk/inference_sample.ipynb +++ b/deepseek-ai-DeepSeek-R1-Distill-Qwen-1.5B/aitk/inference_sample.ipynb @@ -17,23 +17,7 @@ "metadata": {}, "outputs": [], "source": [ - "# reference: https://learn.microsoft.com/en-us/windows/ai/new-windows-ml/tutorial?tabs=python#acquiring-the-model-and-preprocessing\n", - "import subprocess\n", - "import json\n", - "import sys\n", - "import os\n", - "import onnxruntime_genai as og\n", - "\n", - "def register_execution_providers():\n", - " worker_script = os.path.abspath('winml.py')\n", - " result = subprocess.check_output([sys.executable, worker_script], text=True)\n", - " paths = json.loads(result)\n", - " for item in paths.items():\n", - " try:\n", - " og.register_execution_provider_library(item[0], item[1])\n", - " except Exception as e:\n", - " print(f\"Failed to register execution provider {item[0]}: {e}\")\n", - "\n", + "from winml import register_execution_providers\n", "register_execution_providers()" ] }, diff --git a/deepseek-ai-DeepSeek-R1-Distill-Qwen-1.5B/aitk/winml.py b/deepseek-ai-DeepSeek-R1-Distill-Qwen-1.5B/aitk/winml.py index febad5a30..c13673487 100644 --- a/deepseek-ai-DeepSeek-R1-Distill-Qwen-1.5B/aitk/winml.py +++ b/deepseek-ai-DeepSeek-R1-Distill-Qwen-1.5B/aitk/winml.py @@ -1,15 +1,13 @@ -import json - -def _get_ep_paths() -> dict[str, str]: +def register_execution_providers(): from windowsml import EpCatalog - eps = {} + import onnxruntime_genai as og + with EpCatalog() as catalog: for ep in catalog.find_all_providers(): - # Ensure the provider is ready (downloads/installs if needed) - ep.ensure_ready() - eps[ep.name] = ep.library_path - return eps - -if __name__ == "__main__": - eps = _get_ep_paths() - print(json.dumps(eps)) + try: + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + og.register_execution_provider_library(ep.name, ep.library_path) + print(f"Successfully registered execution provider {ep.name} from {ep.library_path}") + except Exception as e: + print(f"Failed to register execution provider {ep.name} from {ep.library_path}: {e}") diff --git a/deepseek-ai-DeepSeek-R1-Distill-Qwen-14B/aitk/inference_sample.ipynb b/deepseek-ai-DeepSeek-R1-Distill-Qwen-14B/aitk/inference_sample.ipynb index 5a08fd0e0..ab5016437 100644 --- a/deepseek-ai-DeepSeek-R1-Distill-Qwen-14B/aitk/inference_sample.ipynb +++ b/deepseek-ai-DeepSeek-R1-Distill-Qwen-14B/aitk/inference_sample.ipynb @@ -17,23 +17,7 @@ "metadata": {}, "outputs": [], "source": [ - "# reference: https://learn.microsoft.com/en-us/windows/ai/new-windows-ml/tutorial?tabs=python#acquiring-the-model-and-preprocessing\n", - "import subprocess\n", - "import json\n", - "import sys\n", - "import os\n", - "import onnxruntime_genai as og\n", - "\n", - "def register_execution_providers():\n", - " worker_script = os.path.abspath('winml.py')\n", - " result = subprocess.check_output([sys.executable, worker_script], text=True)\n", - " paths = json.loads(result)\n", - " for item in paths.items():\n", - " try:\n", - " og.register_execution_provider_library(item[0], item[1])\n", - " except Exception as e:\n", - " print(f\"Failed to register execution provider {item[0]}: {e}\")\n", - "\n", + "from winml import register_execution_providers\n", "register_execution_providers()" ] }, diff --git a/deepseek-ai-DeepSeek-R1-Distill-Qwen-14B/aitk/winml.py b/deepseek-ai-DeepSeek-R1-Distill-Qwen-14B/aitk/winml.py index febad5a30..4310b7cfb 100644 --- a/deepseek-ai-DeepSeek-R1-Distill-Qwen-14B/aitk/winml.py +++ b/deepseek-ai-DeepSeek-R1-Distill-Qwen-14B/aitk/winml.py @@ -1,15 +1,13 @@ -import json - -def _get_ep_paths() -> dict[str, str]: +def register_execution_providers(): from windowsml import EpCatalog - eps = {} + import onnxruntime as ort + with EpCatalog() as catalog: for ep in catalog.find_all_providers(): - # Ensure the provider is ready (downloads/installs if needed) - ep.ensure_ready() - eps[ep.name] = ep.library_path - return eps - -if __name__ == "__main__": - eps = _get_ep_paths() - print(json.dumps(eps)) + try: + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + ort.register_execution_provider_library(ep.name, ep.library_path) + print(f"Successfully registered execution provider {ep.name} from {ep.library_path}") + except Exception as e: + print(f"Failed to register execution provider {ep.name} from {ep.library_path}: {e}") diff --git a/deepseek-ai-DeepSeek-R1-Distill-Qwen-7B/aitk/inference_sample.ipynb b/deepseek-ai-DeepSeek-R1-Distill-Qwen-7B/aitk/inference_sample.ipynb index 5a08fd0e0..ab5016437 100644 --- a/deepseek-ai-DeepSeek-R1-Distill-Qwen-7B/aitk/inference_sample.ipynb +++ b/deepseek-ai-DeepSeek-R1-Distill-Qwen-7B/aitk/inference_sample.ipynb @@ -17,23 +17,7 @@ "metadata": {}, "outputs": [], "source": [ - "# reference: https://learn.microsoft.com/en-us/windows/ai/new-windows-ml/tutorial?tabs=python#acquiring-the-model-and-preprocessing\n", - "import subprocess\n", - "import json\n", - "import sys\n", - "import os\n", - "import onnxruntime_genai as og\n", - "\n", - "def register_execution_providers():\n", - " worker_script = os.path.abspath('winml.py')\n", - " result = subprocess.check_output([sys.executable, worker_script], text=True)\n", - " paths = json.loads(result)\n", - " for item in paths.items():\n", - " try:\n", - " og.register_execution_provider_library(item[0], item[1])\n", - " except Exception as e:\n", - " print(f\"Failed to register execution provider {item[0]}: {e}\")\n", - "\n", + "from winml import register_execution_providers\n", "register_execution_providers()" ] }, diff --git a/deepseek-ai-DeepSeek-R1-Distill-Qwen-7B/aitk/winml.py b/deepseek-ai-DeepSeek-R1-Distill-Qwen-7B/aitk/winml.py index febad5a30..4310b7cfb 100644 --- a/deepseek-ai-DeepSeek-R1-Distill-Qwen-7B/aitk/winml.py +++ b/deepseek-ai-DeepSeek-R1-Distill-Qwen-7B/aitk/winml.py @@ -1,15 +1,13 @@ -import json - -def _get_ep_paths() -> dict[str, str]: +def register_execution_providers(): from windowsml import EpCatalog - eps = {} + import onnxruntime as ort + with EpCatalog() as catalog: for ep in catalog.find_all_providers(): - # Ensure the provider is ready (downloads/installs if needed) - ep.ensure_ready() - eps[ep.name] = ep.library_path - return eps - -if __name__ == "__main__": - eps = _get_ep_paths() - print(json.dumps(eps)) + try: + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + ort.register_execution_provider_library(ep.name, ep.library_path) + print(f"Successfully registered execution provider {ep.name} from {ep.library_path}") + except Exception as e: + print(f"Failed to register execution provider {ep.name} from {ep.library_path}: {e}") diff --git a/google-bert-bert-base-multilingual-cased/aitk/inference_sample.ipynb b/google-bert-bert-base-multilingual-cased/aitk/inference_sample.ipynb index 188cda02a..b8864ee30 100644 --- a/google-bert-bert-base-multilingual-cased/aitk/inference_sample.ipynb +++ b/google-bert-bert-base-multilingual-cased/aitk/inference_sample.ipynb @@ -19,23 +19,7 @@ "metadata": {}, "outputs": [], "source": [ - "# reference: https://learn.microsoft.com/en-us/windows/ai/new-windows-ml/tutorial?tabs=python#acquiring-the-model-and-preprocessing\n", - "import subprocess\n", - "import json\n", - "import sys\n", - "import os\n", - "import onnxruntime as ort\n", - "\n", - "def register_execution_providers():\n", - " worker_script = os.path.abspath('winml.py')\n", - " result = subprocess.check_output([sys.executable, worker_script], text=True)\n", - " paths = json.loads(result)\n", - " for item in paths.items():\n", - " try:\n", - " ort.register_execution_provider_library(item[0], item[1])\n", - " except Exception as e:\n", - " print(f\"Failed to register execution provider {item[0]}: {e}\")\n", - "\n", + "from winml import register_execution_providers\n", "register_execution_providers()" ] }, diff --git a/google-bert-bert-base-multilingual-cased/aitk/winml.py b/google-bert-bert-base-multilingual-cased/aitk/winml.py index febad5a30..4310b7cfb 100644 --- a/google-bert-bert-base-multilingual-cased/aitk/winml.py +++ b/google-bert-bert-base-multilingual-cased/aitk/winml.py @@ -1,15 +1,13 @@ -import json - -def _get_ep_paths() -> dict[str, str]: +def register_execution_providers(): from windowsml import EpCatalog - eps = {} + import onnxruntime as ort + with EpCatalog() as catalog: for ep in catalog.find_all_providers(): - # Ensure the provider is ready (downloads/installs if needed) - ep.ensure_ready() - eps[ep.name] = ep.library_path - return eps - -if __name__ == "__main__": - eps = _get_ep_paths() - print(json.dumps(eps)) + try: + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + ort.register_execution_provider_library(ep.name, ep.library_path) + print(f"Successfully registered execution provider {ep.name} from {ep.library_path}") + except Exception as e: + print(f"Failed to register execution provider {ep.name} from {ep.library_path}: {e}") diff --git a/google-vit-base-patch16-224/aitk/inference_sample.ipynb b/google-vit-base-patch16-224/aitk/inference_sample.ipynb index 62936bbe1..b7693678d 100644 --- a/google-vit-base-patch16-224/aitk/inference_sample.ipynb +++ b/google-vit-base-patch16-224/aitk/inference_sample.ipynb @@ -22,23 +22,7 @@ "metadata": {}, "outputs": [], "source": [ - "# reference: https://learn.microsoft.com/en-us/windows/ai/new-windows-ml/tutorial?tabs=python#acquiring-the-model-and-preprocessing\n", - "import subprocess\n", - "import json\n", - "import sys\n", - "import os\n", - "import onnxruntime as ort\n", - "\n", - "def register_execution_providers():\n", - " worker_script = os.path.abspath('winml.py')\n", - " result = subprocess.check_output([sys.executable, worker_script], text=True)\n", - " paths = json.loads(result)\n", - " for item in paths.items():\n", - " try:\n", - " ort.register_execution_provider_library(item[0], item[1])\n", - " except Exception as e:\n", - " print(f\"Failed to register execution provider {item[0]}: {e}\")\n", - "\n", + "from winml import register_execution_providers\n", "register_execution_providers()" ] }, diff --git a/google-vit-base-patch16-224/aitk/winml.py b/google-vit-base-patch16-224/aitk/winml.py index febad5a30..4310b7cfb 100644 --- a/google-vit-base-patch16-224/aitk/winml.py +++ b/google-vit-base-patch16-224/aitk/winml.py @@ -1,15 +1,13 @@ -import json - -def _get_ep_paths() -> dict[str, str]: +def register_execution_providers(): from windowsml import EpCatalog - eps = {} + import onnxruntime as ort + with EpCatalog() as catalog: for ep in catalog.find_all_providers(): - # Ensure the provider is ready (downloads/installs if needed) - ep.ensure_ready() - eps[ep.name] = ep.library_path - return eps - -if __name__ == "__main__": - eps = _get_ep_paths() - print(json.dumps(eps)) + try: + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + ort.register_execution_provider_library(ep.name, ep.library_path) + print(f"Successfully registered execution provider {ep.name} from {ep.library_path}") + except Exception as e: + print(f"Failed to register execution provider {ep.name} from {ep.library_path}: {e}") diff --git a/intel-bert-base-uncased-mrpc/aitk/inference_sample.ipynb b/intel-bert-base-uncased-mrpc/aitk/inference_sample.ipynb index 73187ddfa..eff40453e 100644 --- a/intel-bert-base-uncased-mrpc/aitk/inference_sample.ipynb +++ b/intel-bert-base-uncased-mrpc/aitk/inference_sample.ipynb @@ -19,23 +19,7 @@ "metadata": {}, "outputs": [], "source": [ - "# reference: https://learn.microsoft.com/en-us/windows/ai/new-windows-ml/tutorial?tabs=python#acquiring-the-model-and-preprocessing\n", - "import subprocess\n", - "import json\n", - "import sys\n", - "import os\n", - "import onnxruntime as ort\n", - "\n", - "def register_execution_providers():\n", - " worker_script = os.path.abspath('winml.py')\n", - " result = subprocess.check_output([sys.executable, worker_script], text=True)\n", - " paths = json.loads(result)\n", - " for item in paths.items():\n", - " try:\n", - " ort.register_execution_provider_library(item[0], item[1])\n", - " except Exception as e:\n", - " print(f\"Failed to register execution provider {item[0]}: {e}\")\n", - "\n", + "from winml import register_execution_providers\n", "register_execution_providers()" ] }, diff --git a/intel-bert-base-uncased-mrpc/aitk/winml.py b/intel-bert-base-uncased-mrpc/aitk/winml.py index febad5a30..4310b7cfb 100644 --- a/intel-bert-base-uncased-mrpc/aitk/winml.py +++ b/intel-bert-base-uncased-mrpc/aitk/winml.py @@ -1,15 +1,13 @@ -import json - -def _get_ep_paths() -> dict[str, str]: +def register_execution_providers(): from windowsml import EpCatalog - eps = {} + import onnxruntime as ort + with EpCatalog() as catalog: for ep in catalog.find_all_providers(): - # Ensure the provider is ready (downloads/installs if needed) - ep.ensure_ready() - eps[ep.name] = ep.library_path - return eps - -if __name__ == "__main__": - eps = _get_ep_paths() - print(json.dumps(eps)) + try: + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + ort.register_execution_provider_library(ep.name, ep.library_path) + print(f"Successfully registered execution provider {ep.name} from {ep.library_path}") + except Exception as e: + print(f"Failed to register execution provider {ep.name} from {ep.library_path}: {e}") diff --git a/laion-CLIP-ViT-B-32-laion2B-s34B-b79K/aitk/inference_sample.ipynb b/laion-CLIP-ViT-B-32-laion2B-s34B-b79K/aitk/inference_sample.ipynb index f2f5c2d83..cf75d28d8 100644 --- a/laion-CLIP-ViT-B-32-laion2B-s34B-b79K/aitk/inference_sample.ipynb +++ b/laion-CLIP-ViT-B-32-laion2B-s34B-b79K/aitk/inference_sample.ipynb @@ -25,23 +25,7 @@ "metadata": {}, "outputs": [], "source": [ - "# reference: https://learn.microsoft.com/en-us/windows/ai/new-windows-ml/tutorial?tabs=python#acquiring-the-model-and-preprocessing\n", - "import subprocess\n", - "import json\n", - "import sys\n", - "import os\n", - "import onnxruntime as ort\n", - "\n", - "def register_execution_providers():\n", - " worker_script = os.path.abspath('winml.py')\n", - " result = subprocess.check_output([sys.executable, worker_script], text=True)\n", - " paths = json.loads(result)\n", - " for item in paths.items():\n", - " try:\n", - " ort.register_execution_provider_library(item[0], item[1])\n", - " except Exception as e:\n", - " print(f\"Failed to register execution provider {item[0]}: {e}\")\n", - "\n", + "from winml import register_execution_providers\n", "register_execution_providers()" ] }, diff --git a/laion-CLIP-ViT-B-32-laion2B-s34B-b79K/aitk/winml.py b/laion-CLIP-ViT-B-32-laion2B-s34B-b79K/aitk/winml.py index febad5a30..4310b7cfb 100644 --- a/laion-CLIP-ViT-B-32-laion2B-s34B-b79K/aitk/winml.py +++ b/laion-CLIP-ViT-B-32-laion2B-s34B-b79K/aitk/winml.py @@ -1,15 +1,13 @@ -import json - -def _get_ep_paths() -> dict[str, str]: +def register_execution_providers(): from windowsml import EpCatalog - eps = {} + import onnxruntime as ort + with EpCatalog() as catalog: for ep in catalog.find_all_providers(): - # Ensure the provider is ready (downloads/installs if needed) - ep.ensure_ready() - eps[ep.name] = ep.library_path - return eps - -if __name__ == "__main__": - eps = _get_ep_paths() - print(json.dumps(eps)) + try: + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + ort.register_execution_provider_library(ep.name, ep.library_path) + print(f"Successfully registered execution provider {ep.name} from {ep.library_path}") + except Exception as e: + print(f"Failed to register execution provider {ep.name} from {ep.library_path}: {e}") diff --git a/meta-llama-Llama-3.1-8B-Instruct/aitk/inference_sample.ipynb b/meta-llama-Llama-3.1-8B-Instruct/aitk/inference_sample.ipynb index c511b100e..965f3f52a 100644 --- a/meta-llama-Llama-3.1-8B-Instruct/aitk/inference_sample.ipynb +++ b/meta-llama-Llama-3.1-8B-Instruct/aitk/inference_sample.ipynb @@ -17,23 +17,7 @@ "metadata": {}, "outputs": [], "source": [ - "# reference: https://learn.microsoft.com/en-us/windows/ai/new-windows-ml/tutorial?tabs=python#acquiring-the-model-and-preprocessing\n", - "import subprocess\n", - "import json\n", - "import sys\n", - "import os\n", - "import onnxruntime_genai as og\n", - "\n", - "def register_execution_providers():\n", - " worker_script = os.path.abspath('winml.py')\n", - " result = subprocess.check_output([sys.executable, worker_script], text=True)\n", - " paths = json.loads(result)\n", - " for item in paths.items():\n", - " try:\n", - " og.register_execution_provider_library(item[0], item[1])\n", - " except Exception as e:\n", - " print(f\"Failed to register execution provider {item[0]}: {e}\")\n", - "\n", + "from winml import register_execution_providers\n", "register_execution_providers()" ] }, diff --git a/meta-llama-Llama-3.1-8B-Instruct/aitk/winml.py b/meta-llama-Llama-3.1-8B-Instruct/aitk/winml.py index febad5a30..4310b7cfb 100644 --- a/meta-llama-Llama-3.1-8B-Instruct/aitk/winml.py +++ b/meta-llama-Llama-3.1-8B-Instruct/aitk/winml.py @@ -1,15 +1,13 @@ -import json - -def _get_ep_paths() -> dict[str, str]: +def register_execution_providers(): from windowsml import EpCatalog - eps = {} + import onnxruntime as ort + with EpCatalog() as catalog: for ep in catalog.find_all_providers(): - # Ensure the provider is ready (downloads/installs if needed) - ep.ensure_ready() - eps[ep.name] = ep.library_path - return eps - -if __name__ == "__main__": - eps = _get_ep_paths() - print(json.dumps(eps)) + try: + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + ort.register_execution_provider_library(ep.name, ep.library_path) + print(f"Successfully registered execution provider {ep.name} from {ep.library_path}") + except Exception as e: + print(f"Failed to register execution provider {ep.name} from {ep.library_path}: {e}") diff --git a/meta-llama-Llama-3.2-1B-Instruct/aitk/inference_sample.ipynb b/meta-llama-Llama-3.2-1B-Instruct/aitk/inference_sample.ipynb index c511b100e..965f3f52a 100644 --- a/meta-llama-Llama-3.2-1B-Instruct/aitk/inference_sample.ipynb +++ b/meta-llama-Llama-3.2-1B-Instruct/aitk/inference_sample.ipynb @@ -17,23 +17,7 @@ "metadata": {}, "outputs": [], "source": [ - "# reference: https://learn.microsoft.com/en-us/windows/ai/new-windows-ml/tutorial?tabs=python#acquiring-the-model-and-preprocessing\n", - "import subprocess\n", - "import json\n", - "import sys\n", - "import os\n", - "import onnxruntime_genai as og\n", - "\n", - "def register_execution_providers():\n", - " worker_script = os.path.abspath('winml.py')\n", - " result = subprocess.check_output([sys.executable, worker_script], text=True)\n", - " paths = json.loads(result)\n", - " for item in paths.items():\n", - " try:\n", - " og.register_execution_provider_library(item[0], item[1])\n", - " except Exception as e:\n", - " print(f\"Failed to register execution provider {item[0]}: {e}\")\n", - "\n", + "from winml import register_execution_providers\n", "register_execution_providers()" ] }, diff --git a/meta-llama-Llama-3.2-1B-Instruct/aitk/winml.py b/meta-llama-Llama-3.2-1B-Instruct/aitk/winml.py index febad5a30..4310b7cfb 100644 --- a/meta-llama-Llama-3.2-1B-Instruct/aitk/winml.py +++ b/meta-llama-Llama-3.2-1B-Instruct/aitk/winml.py @@ -1,15 +1,13 @@ -import json - -def _get_ep_paths() -> dict[str, str]: +def register_execution_providers(): from windowsml import EpCatalog - eps = {} + import onnxruntime as ort + with EpCatalog() as catalog: for ep in catalog.find_all_providers(): - # Ensure the provider is ready (downloads/installs if needed) - ep.ensure_ready() - eps[ep.name] = ep.library_path - return eps - -if __name__ == "__main__": - eps = _get_ep_paths() - print(json.dumps(eps)) + try: + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + ort.register_execution_provider_library(ep.name, ep.library_path) + print(f"Successfully registered execution provider {ep.name} from {ep.library_path}") + except Exception as e: + print(f"Failed to register execution provider {ep.name} from {ep.library_path}: {e}") diff --git a/microsoft-Phi-3-mini-128k-instruct/aitk/inference_sample.ipynb b/microsoft-Phi-3-mini-128k-instruct/aitk/inference_sample.ipynb index d9ede1175..56d4f6a50 100644 --- a/microsoft-Phi-3-mini-128k-instruct/aitk/inference_sample.ipynb +++ b/microsoft-Phi-3-mini-128k-instruct/aitk/inference_sample.ipynb @@ -17,23 +17,7 @@ "metadata": {}, "outputs": [], "source": [ - "# reference: https://learn.microsoft.com/en-us/windows/ai/new-windows-ml/tutorial?tabs=python#acquiring-the-model-and-preprocessing\n", - "import subprocess\n", - "import json\n", - "import sys\n", - "import os\n", - "import onnxruntime_genai as og\n", - "\n", - "def register_execution_providers():\n", - " worker_script = os.path.abspath('winml.py')\n", - " result = subprocess.check_output([sys.executable, worker_script], text=True)\n", - " paths = json.loads(result)\n", - " for item in paths.items():\n", - " try:\n", - " og.register_execution_provider_library(item[0], item[1])\n", - " except Exception as e:\n", - " print(f\"Failed to register execution provider {item[0]}: {e}\")\n", - "\n", + "from winml import register_execution_providers\n", "register_execution_providers()" ] }, diff --git a/microsoft-Phi-3-mini-128k-instruct/aitk/winml.py b/microsoft-Phi-3-mini-128k-instruct/aitk/winml.py index febad5a30..4310b7cfb 100644 --- a/microsoft-Phi-3-mini-128k-instruct/aitk/winml.py +++ b/microsoft-Phi-3-mini-128k-instruct/aitk/winml.py @@ -1,15 +1,13 @@ -import json - -def _get_ep_paths() -> dict[str, str]: +def register_execution_providers(): from windowsml import EpCatalog - eps = {} + import onnxruntime as ort + with EpCatalog() as catalog: for ep in catalog.find_all_providers(): - # Ensure the provider is ready (downloads/installs if needed) - ep.ensure_ready() - eps[ep.name] = ep.library_path - return eps - -if __name__ == "__main__": - eps = _get_ep_paths() - print(json.dumps(eps)) + try: + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + ort.register_execution_provider_library(ep.name, ep.library_path) + print(f"Successfully registered execution provider {ep.name} from {ep.library_path}") + except Exception as e: + print(f"Failed to register execution provider {ep.name} from {ep.library_path}: {e}") diff --git a/microsoft-Phi-3-mini-4k-instruct/aitk/inference_sample.ipynb b/microsoft-Phi-3-mini-4k-instruct/aitk/inference_sample.ipynb index d9ede1175..56d4f6a50 100644 --- a/microsoft-Phi-3-mini-4k-instruct/aitk/inference_sample.ipynb +++ b/microsoft-Phi-3-mini-4k-instruct/aitk/inference_sample.ipynb @@ -17,23 +17,7 @@ "metadata": {}, "outputs": [], "source": [ - "# reference: https://learn.microsoft.com/en-us/windows/ai/new-windows-ml/tutorial?tabs=python#acquiring-the-model-and-preprocessing\n", - "import subprocess\n", - "import json\n", - "import sys\n", - "import os\n", - "import onnxruntime_genai as og\n", - "\n", - "def register_execution_providers():\n", - " worker_script = os.path.abspath('winml.py')\n", - " result = subprocess.check_output([sys.executable, worker_script], text=True)\n", - " paths = json.loads(result)\n", - " for item in paths.items():\n", - " try:\n", - " og.register_execution_provider_library(item[0], item[1])\n", - " except Exception as e:\n", - " print(f\"Failed to register execution provider {item[0]}: {e}\")\n", - "\n", + "from winml import register_execution_providers\n", "register_execution_providers()" ] }, diff --git a/microsoft-Phi-3-mini-4k-instruct/aitk/winml.py b/microsoft-Phi-3-mini-4k-instruct/aitk/winml.py index febad5a30..4310b7cfb 100644 --- a/microsoft-Phi-3-mini-4k-instruct/aitk/winml.py +++ b/microsoft-Phi-3-mini-4k-instruct/aitk/winml.py @@ -1,15 +1,13 @@ -import json - -def _get_ep_paths() -> dict[str, str]: +def register_execution_providers(): from windowsml import EpCatalog - eps = {} + import onnxruntime as ort + with EpCatalog() as catalog: for ep in catalog.find_all_providers(): - # Ensure the provider is ready (downloads/installs if needed) - ep.ensure_ready() - eps[ep.name] = ep.library_path - return eps - -if __name__ == "__main__": - eps = _get_ep_paths() - print(json.dumps(eps)) + try: + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + ort.register_execution_provider_library(ep.name, ep.library_path) + print(f"Successfully registered execution provider {ep.name} from {ep.library_path}") + except Exception as e: + print(f"Failed to register execution provider {ep.name} from {ep.library_path}: {e}") diff --git a/microsoft-Phi-3.5-mini-instruct/aitk/inference_sample.ipynb b/microsoft-Phi-3.5-mini-instruct/aitk/inference_sample.ipynb index 55d198125..d40a1ed61 100644 --- a/microsoft-Phi-3.5-mini-instruct/aitk/inference_sample.ipynb +++ b/microsoft-Phi-3.5-mini-instruct/aitk/inference_sample.ipynb @@ -17,23 +17,7 @@ "metadata": {}, "outputs": [], "source": [ - "# reference: https://learn.microsoft.com/en-us/windows/ai/new-windows-ml/tutorial?tabs=python#acquiring-the-model-and-preprocessing\n", - "import subprocess\n", - "import json\n", - "import sys\n", - "import os\n", - "import onnxruntime_genai as og\n", - "\n", - "def register_execution_providers():\n", - " worker_script = os.path.abspath('winml.py')\n", - " result = subprocess.check_output([sys.executable, worker_script], text=True)\n", - " paths = json.loads(result)\n", - " for item in paths.items():\n", - " try:\n", - " og.register_execution_provider_library(item[0], item[1])\n", - " except Exception as e:\n", - " print(f\"Failed to register execution provider {item[0]}: {e}\")\n", - "\n", + "from winml import register_execution_providers\n", "register_execution_providers()" ] }, diff --git a/microsoft-Phi-3.5-mini-instruct/aitk/winml.py b/microsoft-Phi-3.5-mini-instruct/aitk/winml.py index febad5a30..4310b7cfb 100644 --- a/microsoft-Phi-3.5-mini-instruct/aitk/winml.py +++ b/microsoft-Phi-3.5-mini-instruct/aitk/winml.py @@ -1,15 +1,13 @@ -import json - -def _get_ep_paths() -> dict[str, str]: +def register_execution_providers(): from windowsml import EpCatalog - eps = {} + import onnxruntime as ort + with EpCatalog() as catalog: for ep in catalog.find_all_providers(): - # Ensure the provider is ready (downloads/installs if needed) - ep.ensure_ready() - eps[ep.name] = ep.library_path - return eps - -if __name__ == "__main__": - eps = _get_ep_paths() - print(json.dumps(eps)) + try: + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + ort.register_execution_provider_library(ep.name, ep.library_path) + print(f"Successfully registered execution provider {ep.name} from {ep.library_path}") + except Exception as e: + print(f"Failed to register execution provider {ep.name} from {ep.library_path}: {e}") diff --git a/microsoft-Phi-4-mini-instruct/aitk/inference_sample.ipynb b/microsoft-Phi-4-mini-instruct/aitk/inference_sample.ipynb index d9ede1175..56d4f6a50 100644 --- a/microsoft-Phi-4-mini-instruct/aitk/inference_sample.ipynb +++ b/microsoft-Phi-4-mini-instruct/aitk/inference_sample.ipynb @@ -17,23 +17,7 @@ "metadata": {}, "outputs": [], "source": [ - "# reference: https://learn.microsoft.com/en-us/windows/ai/new-windows-ml/tutorial?tabs=python#acquiring-the-model-and-preprocessing\n", - "import subprocess\n", - "import json\n", - "import sys\n", - "import os\n", - "import onnxruntime_genai as og\n", - "\n", - "def register_execution_providers():\n", - " worker_script = os.path.abspath('winml.py')\n", - " result = subprocess.check_output([sys.executable, worker_script], text=True)\n", - " paths = json.loads(result)\n", - " for item in paths.items():\n", - " try:\n", - " og.register_execution_provider_library(item[0], item[1])\n", - " except Exception as e:\n", - " print(f\"Failed to register execution provider {item[0]}: {e}\")\n", - "\n", + "from winml import register_execution_providers\n", "register_execution_providers()" ] }, diff --git a/microsoft-Phi-4-mini-instruct/aitk/winml.py b/microsoft-Phi-4-mini-instruct/aitk/winml.py index febad5a30..4310b7cfb 100644 --- a/microsoft-Phi-4-mini-instruct/aitk/winml.py +++ b/microsoft-Phi-4-mini-instruct/aitk/winml.py @@ -1,15 +1,13 @@ -import json - -def _get_ep_paths() -> dict[str, str]: +def register_execution_providers(): from windowsml import EpCatalog - eps = {} + import onnxruntime as ort + with EpCatalog() as catalog: for ep in catalog.find_all_providers(): - # Ensure the provider is ready (downloads/installs if needed) - ep.ensure_ready() - eps[ep.name] = ep.library_path - return eps - -if __name__ == "__main__": - eps = _get_ep_paths() - print(json.dumps(eps)) + try: + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + ort.register_execution_provider_library(ep.name, ep.library_path) + print(f"Successfully registered execution provider {ep.name} from {ep.library_path}") + except Exception as e: + print(f"Failed to register execution provider {ep.name} from {ep.library_path}: {e}") diff --git a/microsoft-Phi-4-mini-reasoning/aitk/inference_sample.ipynb b/microsoft-Phi-4-mini-reasoning/aitk/inference_sample.ipynb index d9ede1175..56d4f6a50 100644 --- a/microsoft-Phi-4-mini-reasoning/aitk/inference_sample.ipynb +++ b/microsoft-Phi-4-mini-reasoning/aitk/inference_sample.ipynb @@ -17,23 +17,7 @@ "metadata": {}, "outputs": [], "source": [ - "# reference: https://learn.microsoft.com/en-us/windows/ai/new-windows-ml/tutorial?tabs=python#acquiring-the-model-and-preprocessing\n", - "import subprocess\n", - "import json\n", - "import sys\n", - "import os\n", - "import onnxruntime_genai as og\n", - "\n", - "def register_execution_providers():\n", - " worker_script = os.path.abspath('winml.py')\n", - " result = subprocess.check_output([sys.executable, worker_script], text=True)\n", - " paths = json.loads(result)\n", - " for item in paths.items():\n", - " try:\n", - " og.register_execution_provider_library(item[0], item[1])\n", - " except Exception as e:\n", - " print(f\"Failed to register execution provider {item[0]}: {e}\")\n", - "\n", + "from winml import register_execution_providers\n", "register_execution_providers()" ] }, diff --git a/microsoft-Phi-4-mini-reasoning/aitk/winml.py b/microsoft-Phi-4-mini-reasoning/aitk/winml.py index febad5a30..4310b7cfb 100644 --- a/microsoft-Phi-4-mini-reasoning/aitk/winml.py +++ b/microsoft-Phi-4-mini-reasoning/aitk/winml.py @@ -1,15 +1,13 @@ -import json - -def _get_ep_paths() -> dict[str, str]: +def register_execution_providers(): from windowsml import EpCatalog - eps = {} + import onnxruntime as ort + with EpCatalog() as catalog: for ep in catalog.find_all_providers(): - # Ensure the provider is ready (downloads/installs if needed) - ep.ensure_ready() - eps[ep.name] = ep.library_path - return eps - -if __name__ == "__main__": - eps = _get_ep_paths() - print(json.dumps(eps)) + try: + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + ort.register_execution_provider_library(ep.name, ep.library_path) + print(f"Successfully registered execution provider {ep.name} from {ep.library_path}") + except Exception as e: + print(f"Failed to register execution provider {ep.name} from {ep.library_path}: {e}") diff --git a/microsoft-Phi-4-reasoning-plus/aitk/inference_sample.ipynb b/microsoft-Phi-4-reasoning-plus/aitk/inference_sample.ipynb index d9ede1175..56d4f6a50 100644 --- a/microsoft-Phi-4-reasoning-plus/aitk/inference_sample.ipynb +++ b/microsoft-Phi-4-reasoning-plus/aitk/inference_sample.ipynb @@ -17,23 +17,7 @@ "metadata": {}, "outputs": [], "source": [ - "# reference: https://learn.microsoft.com/en-us/windows/ai/new-windows-ml/tutorial?tabs=python#acquiring-the-model-and-preprocessing\n", - "import subprocess\n", - "import json\n", - "import sys\n", - "import os\n", - "import onnxruntime_genai as og\n", - "\n", - "def register_execution_providers():\n", - " worker_script = os.path.abspath('winml.py')\n", - " result = subprocess.check_output([sys.executable, worker_script], text=True)\n", - " paths = json.loads(result)\n", - " for item in paths.items():\n", - " try:\n", - " og.register_execution_provider_library(item[0], item[1])\n", - " except Exception as e:\n", - " print(f\"Failed to register execution provider {item[0]}: {e}\")\n", - "\n", + "from winml import register_execution_providers\n", "register_execution_providers()" ] }, diff --git a/microsoft-Phi-4-reasoning-plus/aitk/winml.py b/microsoft-Phi-4-reasoning-plus/aitk/winml.py index febad5a30..4310b7cfb 100644 --- a/microsoft-Phi-4-reasoning-plus/aitk/winml.py +++ b/microsoft-Phi-4-reasoning-plus/aitk/winml.py @@ -1,15 +1,13 @@ -import json - -def _get_ep_paths() -> dict[str, str]: +def register_execution_providers(): from windowsml import EpCatalog - eps = {} + import onnxruntime as ort + with EpCatalog() as catalog: for ep in catalog.find_all_providers(): - # Ensure the provider is ready (downloads/installs if needed) - ep.ensure_ready() - eps[ep.name] = ep.library_path - return eps - -if __name__ == "__main__": - eps = _get_ep_paths() - print(json.dumps(eps)) + try: + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + ort.register_execution_provider_library(ep.name, ep.library_path) + print(f"Successfully registered execution provider {ep.name} from {ep.library_path}") + except Exception as e: + print(f"Failed to register execution provider {ep.name} from {ep.library_path}: {e}") diff --git a/microsoft-Phi-4-reasoning/aitk/inference_sample.ipynb b/microsoft-Phi-4-reasoning/aitk/inference_sample.ipynb index d9ede1175..56d4f6a50 100644 --- a/microsoft-Phi-4-reasoning/aitk/inference_sample.ipynb +++ b/microsoft-Phi-4-reasoning/aitk/inference_sample.ipynb @@ -17,23 +17,7 @@ "metadata": {}, "outputs": [], "source": [ - "# reference: https://learn.microsoft.com/en-us/windows/ai/new-windows-ml/tutorial?tabs=python#acquiring-the-model-and-preprocessing\n", - "import subprocess\n", - "import json\n", - "import sys\n", - "import os\n", - "import onnxruntime_genai as og\n", - "\n", - "def register_execution_providers():\n", - " worker_script = os.path.abspath('winml.py')\n", - " result = subprocess.check_output([sys.executable, worker_script], text=True)\n", - " paths = json.loads(result)\n", - " for item in paths.items():\n", - " try:\n", - " og.register_execution_provider_library(item[0], item[1])\n", - " except Exception as e:\n", - " print(f\"Failed to register execution provider {item[0]}: {e}\")\n", - "\n", + "from winml import register_execution_providers\n", "register_execution_providers()" ] }, diff --git a/microsoft-Phi-4-reasoning/aitk/winml.py b/microsoft-Phi-4-reasoning/aitk/winml.py index febad5a30..4310b7cfb 100644 --- a/microsoft-Phi-4-reasoning/aitk/winml.py +++ b/microsoft-Phi-4-reasoning/aitk/winml.py @@ -1,15 +1,13 @@ -import json - -def _get_ep_paths() -> dict[str, str]: +def register_execution_providers(): from windowsml import EpCatalog - eps = {} + import onnxruntime as ort + with EpCatalog() as catalog: for ep in catalog.find_all_providers(): - # Ensure the provider is ready (downloads/installs if needed) - ep.ensure_ready() - eps[ep.name] = ep.library_path - return eps - -if __name__ == "__main__": - eps = _get_ep_paths() - print(json.dumps(eps)) + try: + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + ort.register_execution_provider_library(ep.name, ep.library_path) + print(f"Successfully registered execution provider {ep.name} from {ep.library_path}") + except Exception as e: + print(f"Failed to register execution provider {ep.name} from {ep.library_path}: {e}") diff --git a/microsoft-Phi-4/aitk/inference_sample.ipynb b/microsoft-Phi-4/aitk/inference_sample.ipynb index d9ede1175..56d4f6a50 100644 --- a/microsoft-Phi-4/aitk/inference_sample.ipynb +++ b/microsoft-Phi-4/aitk/inference_sample.ipynb @@ -17,23 +17,7 @@ "metadata": {}, "outputs": [], "source": [ - "# reference: https://learn.microsoft.com/en-us/windows/ai/new-windows-ml/tutorial?tabs=python#acquiring-the-model-and-preprocessing\n", - "import subprocess\n", - "import json\n", - "import sys\n", - "import os\n", - "import onnxruntime_genai as og\n", - "\n", - "def register_execution_providers():\n", - " worker_script = os.path.abspath('winml.py')\n", - " result = subprocess.check_output([sys.executable, worker_script], text=True)\n", - " paths = json.loads(result)\n", - " for item in paths.items():\n", - " try:\n", - " og.register_execution_provider_library(item[0], item[1])\n", - " except Exception as e:\n", - " print(f\"Failed to register execution provider {item[0]}: {e}\")\n", - "\n", + "from winml import register_execution_providers\n", "register_execution_providers()" ] }, diff --git a/microsoft-Phi-4/aitk/winml.py b/microsoft-Phi-4/aitk/winml.py index febad5a30..4310b7cfb 100644 --- a/microsoft-Phi-4/aitk/winml.py +++ b/microsoft-Phi-4/aitk/winml.py @@ -1,15 +1,13 @@ -import json - -def _get_ep_paths() -> dict[str, str]: +def register_execution_providers(): from windowsml import EpCatalog - eps = {} + import onnxruntime as ort + with EpCatalog() as catalog: for ep in catalog.find_all_providers(): - # Ensure the provider is ready (downloads/installs if needed) - ep.ensure_ready() - eps[ep.name] = ep.library_path - return eps - -if __name__ == "__main__": - eps = _get_ep_paths() - print(json.dumps(eps)) + try: + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + ort.register_execution_provider_library(ep.name, ep.library_path) + print(f"Successfully registered execution provider {ep.name} from {ep.library_path}") + except Exception as e: + print(f"Failed to register execution provider {ep.name} from {ep.library_path}: {e}") diff --git a/microsoft-resnet-50/aitk/inference_sample.ipynb b/microsoft-resnet-50/aitk/inference_sample.ipynb index e2a97c45e..5ab80c972 100644 --- a/microsoft-resnet-50/aitk/inference_sample.ipynb +++ b/microsoft-resnet-50/aitk/inference_sample.ipynb @@ -25,23 +25,7 @@ "metadata": {}, "outputs": [], "source": [ - "# reference: https://learn.microsoft.com/en-us/windows/ai/new-windows-ml/tutorial?tabs=python#acquiring-the-model-and-preprocessing\n", - "import subprocess\n", - "import json\n", - "import sys\n", - "import os\n", - "import onnxruntime as ort\n", - "\n", - "def register_execution_providers():\n", - " worker_script = os.path.abspath('winml.py')\n", - " result = subprocess.check_output([sys.executable, worker_script], text=True)\n", - " paths = json.loads(result)\n", - " for item in paths.items():\n", - " try:\n", - " ort.register_execution_provider_library(item[0], item[1])\n", - " except Exception as e:\n", - " print(f\"Failed to register execution provider {item[0]}: {e}\")\n", - "\n", + "from winml import register_execution_providers\n", "register_execution_providers()" ] }, diff --git a/microsoft-resnet-50/aitk/winml.py b/microsoft-resnet-50/aitk/winml.py index febad5a30..4310b7cfb 100644 --- a/microsoft-resnet-50/aitk/winml.py +++ b/microsoft-resnet-50/aitk/winml.py @@ -1,15 +1,13 @@ -import json - -def _get_ep_paths() -> dict[str, str]: +def register_execution_providers(): from windowsml import EpCatalog - eps = {} + import onnxruntime as ort + with EpCatalog() as catalog: for ep in catalog.find_all_providers(): - # Ensure the provider is ready (downloads/installs if needed) - ep.ensure_ready() - eps[ep.name] = ep.library_path - return eps - -if __name__ == "__main__": - eps = _get_ep_paths() - print(json.dumps(eps)) + try: + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + ort.register_execution_provider_library(ep.name, ep.library_path) + print(f"Successfully registered execution provider {ep.name} from {ep.library_path}") + except Exception as e: + print(f"Failed to register execution provider {ep.name} from {ep.library_path}: {e}") diff --git a/mistralai-Mistral-7B-Instruct-v0.2/aitk/inference_sample.ipynb b/mistralai-Mistral-7B-Instruct-v0.2/aitk/inference_sample.ipynb index a7ef75461..53094bffa 100644 --- a/mistralai-Mistral-7B-Instruct-v0.2/aitk/inference_sample.ipynb +++ b/mistralai-Mistral-7B-Instruct-v0.2/aitk/inference_sample.ipynb @@ -17,23 +17,7 @@ "metadata": {}, "outputs": [], "source": [ - "# reference: https://learn.microsoft.com/en-us/windows/ai/new-windows-ml/tutorial?tabs=python#acquiring-the-model-and-preprocessing\n", - "import subprocess\n", - "import json\n", - "import sys\n", - "import os\n", - "import onnxruntime_genai as og\n", - "\n", - "def register_execution_providers():\n", - " worker_script = os.path.abspath('winml.py')\n", - " result = subprocess.check_output([sys.executable, worker_script], text=True)\n", - " paths = json.loads(result)\n", - " for item in paths.items():\n", - " try:\n", - " og.register_execution_provider_library(item[0], item[1])\n", - " except Exception as e:\n", - " print(f\"Failed to register execution provider {item[0]}: {e}\")\n", - "\n", + "from winml import register_execution_providers\n", "register_execution_providers()" ] }, diff --git a/mistralai-Mistral-7B-Instruct-v0.2/aitk/winml.py b/mistralai-Mistral-7B-Instruct-v0.2/aitk/winml.py index febad5a30..4310b7cfb 100644 --- a/mistralai-Mistral-7B-Instruct-v0.2/aitk/winml.py +++ b/mistralai-Mistral-7B-Instruct-v0.2/aitk/winml.py @@ -1,15 +1,13 @@ -import json - -def _get_ep_paths() -> dict[str, str]: +def register_execution_providers(): from windowsml import EpCatalog - eps = {} + import onnxruntime as ort + with EpCatalog() as catalog: for ep in catalog.find_all_providers(): - # Ensure the provider is ready (downloads/installs if needed) - ep.ensure_ready() - eps[ep.name] = ep.library_path - return eps - -if __name__ == "__main__": - eps = _get_ep_paths() - print(json.dumps(eps)) + try: + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + ort.register_execution_provider_library(ep.name, ep.library_path) + print(f"Successfully registered execution provider {ep.name} from {ep.library_path}") + except Exception as e: + print(f"Failed to register execution provider {ep.name} from {ep.library_path}: {e}") diff --git a/mistralai-Mistral-7B-Instruct-v0.3/aitk/inference_sample.ipynb b/mistralai-Mistral-7B-Instruct-v0.3/aitk/inference_sample.ipynb index 4ae517728..6eccd0672 100644 --- a/mistralai-Mistral-7B-Instruct-v0.3/aitk/inference_sample.ipynb +++ b/mistralai-Mistral-7B-Instruct-v0.3/aitk/inference_sample.ipynb @@ -17,23 +17,7 @@ "metadata": {}, "outputs": [], "source": [ - "# reference: https://learn.microsoft.com/en-us/windows/ai/new-windows-ml/tutorial?tabs=python#acquiring-the-model-and-preprocessing\n", - "import subprocess\n", - "import json\n", - "import sys\n", - "import os\n", - "import onnxruntime_genai as og\n", - "\n", - "def register_execution_providers():\n", - " worker_script = os.path.abspath('winml.py')\n", - " result = subprocess.check_output([sys.executable, worker_script], text=True)\n", - " paths = json.loads(result)\n", - " for item in paths.items():\n", - " try:\n", - " og.register_execution_provider_library(item[0], item[1])\n", - " except Exception as e:\n", - " print(f\"Failed to register execution provider {item[0]}: {e}\")\n", - "\n", + "from winml import register_execution_providers\n", "register_execution_providers()" ] }, diff --git a/mistralai-Mistral-7B-Instruct-v0.3/aitk/winml.py b/mistralai-Mistral-7B-Instruct-v0.3/aitk/winml.py index febad5a30..4310b7cfb 100644 --- a/mistralai-Mistral-7B-Instruct-v0.3/aitk/winml.py +++ b/mistralai-Mistral-7B-Instruct-v0.3/aitk/winml.py @@ -1,15 +1,13 @@ -import json - -def _get_ep_paths() -> dict[str, str]: +def register_execution_providers(): from windowsml import EpCatalog - eps = {} + import onnxruntime as ort + with EpCatalog() as catalog: for ep in catalog.find_all_providers(): - # Ensure the provider is ready (downloads/installs if needed) - ep.ensure_ready() - eps[ep.name] = ep.library_path - return eps - -if __name__ == "__main__": - eps = _get_ep_paths() - print(json.dumps(eps)) + try: + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + ort.register_execution_provider_library(ep.name, ep.library_path) + print(f"Successfully registered execution provider {ep.name} from {ep.library_path}") + except Exception as e: + print(f"Failed to register execution provider {ep.name} from {ep.library_path}: {e}") diff --git a/openai-clip-vit-base-patch16/aitk/inference_sample.ipynb b/openai-clip-vit-base-patch16/aitk/inference_sample.ipynb index 5c6d594d0..fdef3b345 100644 --- a/openai-clip-vit-base-patch16/aitk/inference_sample.ipynb +++ b/openai-clip-vit-base-patch16/aitk/inference_sample.ipynb @@ -25,23 +25,7 @@ "metadata": {}, "outputs": [], "source": [ - "# reference: https://learn.microsoft.com/en-us/windows/ai/new-windows-ml/tutorial?tabs=python#acquiring-the-model-and-preprocessing\n", - "import subprocess\n", - "import json\n", - "import sys\n", - "import os\n", - "import onnxruntime as ort\n", - "\n", - "def register_execution_providers():\n", - " worker_script = os.path.abspath('winml.py')\n", - " result = subprocess.check_output([sys.executable, worker_script], text=True)\n", - " paths = json.loads(result)\n", - " for item in paths.items():\n", - " try:\n", - " ort.register_execution_provider_library(item[0], item[1])\n", - " except Exception as e:\n", - " print(f\"Failed to register execution provider {item[0]}: {e}\")\n", - "\n", + "from winml import register_execution_providers\n", "register_execution_providers()" ] }, diff --git a/openai-clip-vit-base-patch16/aitk/winml.py b/openai-clip-vit-base-patch16/aitk/winml.py index febad5a30..4310b7cfb 100644 --- a/openai-clip-vit-base-patch16/aitk/winml.py +++ b/openai-clip-vit-base-patch16/aitk/winml.py @@ -1,15 +1,13 @@ -import json - -def _get_ep_paths() -> dict[str, str]: +def register_execution_providers(): from windowsml import EpCatalog - eps = {} + import onnxruntime as ort + with EpCatalog() as catalog: for ep in catalog.find_all_providers(): - # Ensure the provider is ready (downloads/installs if needed) - ep.ensure_ready() - eps[ep.name] = ep.library_path - return eps - -if __name__ == "__main__": - eps = _get_ep_paths() - print(json.dumps(eps)) + try: + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + ort.register_execution_provider_library(ep.name, ep.library_path) + print(f"Successfully registered execution provider {ep.name} from {ep.library_path}") + except Exception as e: + print(f"Failed to register execution provider {ep.name} from {ep.library_path}: {e}") diff --git a/openai-clip-vit-base-patch32/aitk/inference_sample.ipynb b/openai-clip-vit-base-patch32/aitk/inference_sample.ipynb index 48be4d3ba..b1fdebb04 100644 --- a/openai-clip-vit-base-patch32/aitk/inference_sample.ipynb +++ b/openai-clip-vit-base-patch32/aitk/inference_sample.ipynb @@ -25,23 +25,7 @@ "metadata": {}, "outputs": [], "source": [ - "# reference: https://learn.microsoft.com/en-us/windows/ai/new-windows-ml/tutorial?tabs=python#acquiring-the-model-and-preprocessing\n", - "import subprocess\n", - "import json\n", - "import sys\n", - "import os\n", - "import onnxruntime as ort\n", - "\n", - "def register_execution_providers():\n", - " worker_script = os.path.abspath('winml.py')\n", - " result = subprocess.check_output([sys.executable, worker_script], text=True)\n", - " paths = json.loads(result)\n", - " for item in paths.items():\n", - " try:\n", - " ort.register_execution_provider_library(item[0], item[1])\n", - " except Exception as e:\n", - " print(f\"Failed to register execution provider {item[0]}: {e}\")\n", - "\n", + "from winml import register_execution_providers\n", "register_execution_providers()" ] }, diff --git a/openai-clip-vit-base-patch32/aitk/winml.py b/openai-clip-vit-base-patch32/aitk/winml.py index febad5a30..4310b7cfb 100644 --- a/openai-clip-vit-base-patch32/aitk/winml.py +++ b/openai-clip-vit-base-patch32/aitk/winml.py @@ -1,15 +1,13 @@ -import json - -def _get_ep_paths() -> dict[str, str]: +def register_execution_providers(): from windowsml import EpCatalog - eps = {} + import onnxruntime as ort + with EpCatalog() as catalog: for ep in catalog.find_all_providers(): - # Ensure the provider is ready (downloads/installs if needed) - ep.ensure_ready() - eps[ep.name] = ep.library_path - return eps - -if __name__ == "__main__": - eps = _get_ep_paths() - print(json.dumps(eps)) + try: + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + ort.register_execution_provider_library(ep.name, ep.library_path) + print(f"Successfully registered execution provider {ep.name} from {ep.library_path}") + except Exception as e: + print(f"Failed to register execution provider {ep.name} from {ep.library_path}: {e}") diff --git a/openai-clip-vit-large-patch14/aitk/inference_sample.ipynb b/openai-clip-vit-large-patch14/aitk/inference_sample.ipynb index 4e84005e2..5fb259438 100644 --- a/openai-clip-vit-large-patch14/aitk/inference_sample.ipynb +++ b/openai-clip-vit-large-patch14/aitk/inference_sample.ipynb @@ -25,23 +25,7 @@ "metadata": {}, "outputs": [], "source": [ - "# reference: https://learn.microsoft.com/en-us/windows/ai/new-windows-ml/tutorial?tabs=python#acquiring-the-model-and-preprocessing\n", - "import subprocess\n", - "import json\n", - "import sys\n", - "import os\n", - "import onnxruntime as ort\n", - "\n", - "def register_execution_providers():\n", - " worker_script = os.path.abspath('winml.py')\n", - " result = subprocess.check_output([sys.executable, worker_script], text=True)\n", - " paths = json.loads(result)\n", - " for item in paths.items():\n", - " try:\n", - " ort.register_execution_provider_library(item[0], item[1])\n", - " except Exception as e:\n", - " print(f\"Failed to register execution provider {item[0]}: {e}\")\n", - "\n", + "from winml import register_execution_providers\n", "register_execution_providers()" ] }, diff --git a/openai-clip-vit-large-patch14/aitk/winml.py b/openai-clip-vit-large-patch14/aitk/winml.py index febad5a30..4310b7cfb 100644 --- a/openai-clip-vit-large-patch14/aitk/winml.py +++ b/openai-clip-vit-large-patch14/aitk/winml.py @@ -1,15 +1,13 @@ -import json - -def _get_ep_paths() -> dict[str, str]: +def register_execution_providers(): from windowsml import EpCatalog - eps = {} + import onnxruntime as ort + with EpCatalog() as catalog: for ep in catalog.find_all_providers(): - # Ensure the provider is ready (downloads/installs if needed) - ep.ensure_ready() - eps[ep.name] = ep.library_path - return eps - -if __name__ == "__main__": - eps = _get_ep_paths() - print(json.dumps(eps)) + try: + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + ort.register_execution_provider_library(ep.name, ep.library_path) + print(f"Successfully registered execution provider {ep.name} from {ep.library_path}") + except Exception as e: + print(f"Failed to register execution provider {ep.name} from {ep.library_path}: {e}") diff --git a/openai-whisper-large-v3-turbo/aitk/winml.py b/openai-whisper-large-v3-turbo/aitk/winml.py index febad5a30..4310b7cfb 100644 --- a/openai-whisper-large-v3-turbo/aitk/winml.py +++ b/openai-whisper-large-v3-turbo/aitk/winml.py @@ -1,15 +1,13 @@ -import json - -def _get_ep_paths() -> dict[str, str]: +def register_execution_providers(): from windowsml import EpCatalog - eps = {} + import onnxruntime as ort + with EpCatalog() as catalog: for ep in catalog.find_all_providers(): - # Ensure the provider is ready (downloads/installs if needed) - ep.ensure_ready() - eps[ep.name] = ep.library_path - return eps - -if __name__ == "__main__": - eps = _get_ep_paths() - print(json.dumps(eps)) + try: + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + ort.register_execution_provider_library(ep.name, ep.library_path) + print(f"Successfully registered execution provider {ep.name} from {ep.library_path}") + except Exception as e: + print(f"Failed to register execution provider {ep.name} from {ep.library_path}: {e}") diff --git a/sam-vit-base/aitk/inference_sample.ipynb b/sam-vit-base/aitk/inference_sample.ipynb index 66038e98b..e4f360549 100644 --- a/sam-vit-base/aitk/inference_sample.ipynb +++ b/sam-vit-base/aitk/inference_sample.ipynb @@ -20,24 +20,7 @@ "metadata": {}, "outputs": [], "source": [ - "# reference: https://learn.microsoft.com/en-us/windows/ai/new-windows-ml/tutorial?tabs=python#acquiring-the-model-and-preprocessing\n", - "import subprocess\n", - "import json\n", - "import sys\n", - "import os\n", - "import onnxruntime as ort\n", - "\n", - "def register_execution_providers():\n", - " worker_script = os.path.abspath('winml.py')\n", - " print(worker_script)\n", - " result = subprocess.check_output([sys.executable, worker_script], text=True)\n", - " paths = json.loads(result)\n", - " for item in paths.items():\n", - " try:\n", - " ort.register_execution_provider_library(item[0], item[1])\n", - " except Exception as e:\n", - " print(f\"Failed to register execution provider {item[0]}: {e}\")\n", - "\n", + "from winml import register_execution_providers\n", "register_execution_providers()" ] }, diff --git a/sam-vit-base/aitk/winml.py b/sam-vit-base/aitk/winml.py index febad5a30..4310b7cfb 100644 --- a/sam-vit-base/aitk/winml.py +++ b/sam-vit-base/aitk/winml.py @@ -1,15 +1,13 @@ -import json - -def _get_ep_paths() -> dict[str, str]: +def register_execution_providers(): from windowsml import EpCatalog - eps = {} + import onnxruntime as ort + with EpCatalog() as catalog: for ep in catalog.find_all_providers(): - # Ensure the provider is ready (downloads/installs if needed) - ep.ensure_ready() - eps[ep.name] = ep.library_path - return eps - -if __name__ == "__main__": - eps = _get_ep_paths() - print(json.dumps(eps)) + try: + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + ort.register_execution_provider_library(ep.name, ep.library_path) + print(f"Successfully registered execution provider {ep.name} from {ep.library_path}") + except Exception as e: + print(f"Failed to register execution provider {ep.name} from {ep.library_path}: {e}") diff --git a/sam2.1-hiera-small/aitk/inference_sample.ipynb b/sam2.1-hiera-small/aitk/inference_sample.ipynb index 2dc08d9f8..b21338192 100644 --- a/sam2.1-hiera-small/aitk/inference_sample.ipynb +++ b/sam2.1-hiera-small/aitk/inference_sample.ipynb @@ -20,24 +20,7 @@ "metadata": {}, "outputs": [], "source": [ - "# reference: https://learn.microsoft.com/en-us/windows/ai/new-windows-ml/tutorial?tabs=python#acquiring-the-model-and-preprocessing\n", - "import subprocess\n", - "import json\n", - "import sys\n", - "import os\n", - "import onnxruntime as ort\n", - "\n", - "def register_execution_providers():\n", - " worker_script = os.path.abspath('winml.py')\n", - " print(worker_script)\n", - " result = subprocess.check_output([sys.executable, worker_script], text=True)\n", - " paths = json.loads(result)\n", - " for item in paths.items():\n", - " try:\n", - " ort.register_execution_provider_library(item[0], item[1])\n", - " except Exception as e:\n", - " print(f\"Failed to register execution provider {item[0]}: {e}\")\n", - "\n", + "from winml import register_execution_providers\n", "register_execution_providers()" ] }, diff --git a/sam2.1-hiera-small/aitk/winml.py b/sam2.1-hiera-small/aitk/winml.py index febad5a30..4310b7cfb 100644 --- a/sam2.1-hiera-small/aitk/winml.py +++ b/sam2.1-hiera-small/aitk/winml.py @@ -1,15 +1,13 @@ -import json - -def _get_ep_paths() -> dict[str, str]: +def register_execution_providers(): from windowsml import EpCatalog - eps = {} + import onnxruntime as ort + with EpCatalog() as catalog: for ep in catalog.find_all_providers(): - # Ensure the provider is ready (downloads/installs if needed) - ep.ensure_ready() - eps[ep.name] = ep.library_path - return eps - -if __name__ == "__main__": - eps = _get_ep_paths() - print(json.dumps(eps)) + try: + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + ort.register_execution_provider_library(ep.name, ep.library_path) + print(f"Successfully registered execution provider {ep.name} from {ep.library_path}") + except Exception as e: + print(f"Failed to register execution provider {ep.name} from {ep.library_path}: {e}") diff --git a/sd-legacy-stable-diffusion-v1-5/aitk/sd_ov_workflow_inference_sample.ipynb b/sd-legacy-stable-diffusion-v1-5/aitk/sd_ov_workflow_inference_sample.ipynb index 1722aa431..d44286449 100644 --- a/sd-legacy-stable-diffusion-v1-5/aitk/sd_ov_workflow_inference_sample.ipynb +++ b/sd-legacy-stable-diffusion-v1-5/aitk/sd_ov_workflow_inference_sample.ipynb @@ -19,24 +19,7 @@ "metadata": {}, "outputs": [], "source": [ - "# reference: https://learn.microsoft.com/en-us/windows/ai/new-windows-ml/tutorial?tabs=python#acquiring-the-model-and-preprocessing\n", - "import subprocess\n", - "import json\n", - "import sys\n", - "import os\n", - "import onnxruntime as ort\n", - "\n", - "def register_execution_providers():\n", - " worker_script = os.path.abspath('winml.py')\n", - " print(worker_script)\n", - " result = subprocess.check_output([sys.executable, worker_script], text=True)\n", - " paths = json.loads(result)\n", - " for item in paths.items():\n", - " try:\n", - " ort.register_execution_provider_library(item[0], item[1])\n", - " except Exception as e:\n", - " print(f\"Failed to register execution provider {item[0]}: {e}\")\n", - "\n", + "from winml import register_execution_providers\n", "register_execution_providers()" ] }, diff --git a/sd-legacy-stable-diffusion-v1-5/aitk/sd_qnn_workflow_inference_sample.ipynb b/sd-legacy-stable-diffusion-v1-5/aitk/sd_qnn_workflow_inference_sample.ipynb index fd7e8a1c7..112777df7 100644 --- a/sd-legacy-stable-diffusion-v1-5/aitk/sd_qnn_workflow_inference_sample.ipynb +++ b/sd-legacy-stable-diffusion-v1-5/aitk/sd_qnn_workflow_inference_sample.ipynb @@ -19,24 +19,7 @@ "metadata": {}, "outputs": [], "source": [ - "# reference: https://learn.microsoft.com/en-us/windows/ai/new-windows-ml/tutorial?tabs=python#acquiring-the-model-and-preprocessing\n", - "import subprocess\n", - "import json\n", - "import sys\n", - "import os\n", - "import onnxruntime as ort\n", - "\n", - "def register_execution_providers():\n", - " worker_script = os.path.abspath('winml.py')\n", - " print(worker_script)\n", - " result = subprocess.check_output([sys.executable, worker_script], text=True)\n", - " paths = json.loads(result)\n", - " for item in paths.items():\n", - " try:\n", - " ort.register_execution_provider_library(item[0], item[1])\n", - " except Exception as e:\n", - " print(f\"Failed to register execution provider {item[0]}: {e}\")\n", - "\n", + "from winml import register_execution_providers\n", "register_execution_providers()" ] }, diff --git a/sd-legacy-stable-diffusion-v1-5/aitk/winml.py b/sd-legacy-stable-diffusion-v1-5/aitk/winml.py index febad5a30..4310b7cfb 100644 --- a/sd-legacy-stable-diffusion-v1-5/aitk/winml.py +++ b/sd-legacy-stable-diffusion-v1-5/aitk/winml.py @@ -1,15 +1,13 @@ -import json - -def _get_ep_paths() -> dict[str, str]: +def register_execution_providers(): from windowsml import EpCatalog - eps = {} + import onnxruntime as ort + with EpCatalog() as catalog: for ep in catalog.find_all_providers(): - # Ensure the provider is ready (downloads/installs if needed) - ep.ensure_ready() - eps[ep.name] = ep.library_path - return eps - -if __name__ == "__main__": - eps = _get_ep_paths() - print(json.dumps(eps)) + try: + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + ort.register_execution_provider_library(ep.name, ep.library_path) + print(f"Successfully registered execution provider {ep.name} from {ep.library_path}") + except Exception as e: + print(f"Failed to register execution provider {ep.name} from {ep.library_path}: {e}") diff --git a/sd2-community-stable-diffusion-2-1/aitk/sd_ov_workflow_inference_sample.ipynb b/sd2-community-stable-diffusion-2-1/aitk/sd_ov_workflow_inference_sample.ipynb index a2ebca4ca..ac1d832fb 100644 --- a/sd2-community-stable-diffusion-2-1/aitk/sd_ov_workflow_inference_sample.ipynb +++ b/sd2-community-stable-diffusion-2-1/aitk/sd_ov_workflow_inference_sample.ipynb @@ -19,24 +19,7 @@ "metadata": {}, "outputs": [], "source": [ - "# reference: https://learn.microsoft.com/en-us/windows/ai/new-windows-ml/tutorial?tabs=python#acquiring-the-model-and-preprocessing\n", - "import subprocess\n", - "import json\n", - "import sys\n", - "import os\n", - "import onnxruntime as ort\n", - "\n", - "def register_execution_providers():\n", - " worker_script = os.path.abspath('winml.py')\n", - " print(worker_script)\n", - " result = subprocess.check_output([sys.executable, worker_script], text=True)\n", - " paths = json.loads(result)\n", - " for item in paths.items():\n", - " try:\n", - " ort.register_execution_provider_library(item[0], item[1])\n", - " except Exception as e:\n", - " print(f\"Failed to register execution provider {item[0]}: {e}\")\n", - "\n", + "from winml import register_execution_providers\n", "register_execution_providers()" ] }, diff --git a/sd2-community-stable-diffusion-2-1/aitk/sd_qnn_workflow_inference_sample.ipynb b/sd2-community-stable-diffusion-2-1/aitk/sd_qnn_workflow_inference_sample.ipynb index eca9b6628..6dc8fd59c 100644 --- a/sd2-community-stable-diffusion-2-1/aitk/sd_qnn_workflow_inference_sample.ipynb +++ b/sd2-community-stable-diffusion-2-1/aitk/sd_qnn_workflow_inference_sample.ipynb @@ -19,24 +19,7 @@ "metadata": {}, "outputs": [], "source": [ - "# reference: https://learn.microsoft.com/en-us/windows/ai/new-windows-ml/tutorial?tabs=python#acquiring-the-model-and-preprocessing\n", - "import subprocess\n", - "import json\n", - "import sys\n", - "import os\n", - "import onnxruntime as ort\n", - "\n", - "def register_execution_providers():\n", - " worker_script = os.path.abspath('winml.py')\n", - " print(worker_script)\n", - " result = subprocess.check_output([sys.executable, worker_script], text=True)\n", - " paths = json.loads(result)\n", - " for item in paths.items():\n", - " try:\n", - " ort.register_execution_provider_library(item[0], item[1])\n", - " except Exception as e:\n", - " print(f\"Failed to register execution provider {item[0]}: {e}\")\n", - "\n", + "from winml import register_execution_providers\n", "register_execution_providers()" ] }, diff --git a/sd2-community-stable-diffusion-2-1/aitk/winml.py b/sd2-community-stable-diffusion-2-1/aitk/winml.py index febad5a30..4310b7cfb 100644 --- a/sd2-community-stable-diffusion-2-1/aitk/winml.py +++ b/sd2-community-stable-diffusion-2-1/aitk/winml.py @@ -1,15 +1,13 @@ -import json - -def _get_ep_paths() -> dict[str, str]: +def register_execution_providers(): from windowsml import EpCatalog - eps = {} + import onnxruntime as ort + with EpCatalog() as catalog: for ep in catalog.find_all_providers(): - # Ensure the provider is ready (downloads/installs if needed) - ep.ensure_ready() - eps[ep.name] = ep.library_path - return eps - -if __name__ == "__main__": - eps = _get_ep_paths() - print(json.dumps(eps)) + try: + # Ensure the provider is ready (downloads/installs if needed) + ep.ensure_ready() + ort.register_execution_provider_library(ep.name, ep.library_path) + print(f"Successfully registered execution provider {ep.name} from {ep.library_path}") + except Exception as e: + print(f"Failed to register execution provider {ep.name} from {ep.library_path}: {e}") From a4612dec7131dffa5c6613b3e140d876b0412720 Mon Sep 17 00:00:00 2001 From: hualxie Date: Fri, 24 Apr 2026 15:37:40 +0800 Subject: [PATCH 10/12] correct llm --- .aitk/scripts/project_processor.py | 31 ++++++++++++++++--- .aitk/scripts/sanitize/main.py | 21 +------------ .aitk/scripts/sanitize/utils.py | 17 ++++++++++ .../aitk/inference_sample.ipynb | 18 +---------- .../aitk/_copy.json.config | 2 +- Qwen-Qwen2.5-0.5B-Instruct/aitk/winml.py | 4 +-- Qwen-Qwen2.5-0.5B/aitk/_copy.json.config | 2 +- Qwen-Qwen2.5-0.5B/aitk/winml.py | 4 +-- .../aitk/_copy.json.config | 2 +- Qwen-Qwen2.5-1.5B-Instruct/aitk/winml.py | 4 +-- .../aitk/_copy.json.config | 2 +- Qwen-Qwen2.5-14B-Instruct/aitk/winml.py | 4 +-- .../aitk/_copy.json.config | 2 +- Qwen-Qwen2.5-3B-Instruct/aitk/winml.py | 4 +-- .../aitk/_copy.json.config | 2 +- Qwen-Qwen2.5-7B-Instruct/aitk/winml.py | 4 +-- .../aitk/_copy.json.config | 2 +- .../aitk/winml.py | 4 +-- .../aitk/_copy.json.config | 2 +- .../aitk/winml.py | 4 +-- .../aitk/_copy.json.config | 2 +- Qwen-Qwen2.5-Coder-14B-Instruct/aitk/winml.py | 4 +-- .../aitk/_copy.json.config | 2 +- Qwen-Qwen2.5-Coder-3B-Instruct/aitk/winml.py | 4 +-- .../aitk/_copy.json.config | 2 +- Qwen-Qwen2.5-Coder-7B-Instruct/aitk/winml.py | 4 +-- .../aitk/_copy.json.config | 2 +- .../aitk/winml.py | 4 +-- .../aitk/_copy.json.config | 2 +- .../aitk/winml.py | 4 +-- .../aitk/_copy.json.config | 2 +- .../aitk/winml.py | 4 +-- .../aitk/_copy.json.config | 2 +- .../aitk/winml.py | 4 +-- .../aitk/_copy.json.config | 2 +- .../aitk/winml.py | 4 +-- .../aitk/_copy.json.config | 2 +- .../aitk/winml.py | 4 +-- .../aitk/_copy.json.config | 2 +- .../aitk/winml.py | 4 +-- .../aitk/_copy.json.config | 2 +- microsoft-Phi-3.5-mini-instruct/aitk/winml.py | 4 +-- .../aitk/_copy.json.config | 2 +- microsoft-Phi-4-mini-instruct/aitk/winml.py | 4 +-- .../aitk/_copy.json.config | 2 +- microsoft-Phi-4-mini-reasoning/aitk/winml.py | 4 +-- .../aitk/_copy.json.config | 2 +- microsoft-Phi-4-reasoning-plus/aitk/winml.py | 4 +-- .../aitk/_copy.json.config | 2 +- microsoft-Phi-4-reasoning/aitk/winml.py | 4 +-- microsoft-Phi-4/aitk/_copy.json.config | 2 +- microsoft-Phi-4/aitk/winml.py | 4 +-- .../aitk/_copy.json.config | 2 +- .../aitk/winml.py | 4 +-- .../aitk/_copy.json.config | 2 +- .../aitk/winml.py | 4 +-- .../aitk/qnn_workflow_inference_sample.ipynb | 19 +----------- 57 files changed, 124 insertions(+), 138 deletions(-) diff --git a/.aitk/scripts/project_processor.py b/.aitk/scripts/project_processor.py index 2ae16a879..4f3c36000 100644 --- a/.aitk/scripts/project_processor.py +++ b/.aitk/scripts/project_processor.py @@ -6,7 +6,7 @@ from model_lab import RuntimeEnum from sanitize.constants import ArchitectureEnum, EPNames, IconEnum, ModelStatusEnum -from sanitize.copy_config import CopyConfig +from sanitize.copy_config import Copy, CopyConfig from sanitize.generator_amd import generator_amd from sanitize.generator_dml import generator_dml from sanitize.generator_intel import generator_intel @@ -14,7 +14,14 @@ from sanitize.generator_trtrtx import generator_trtrtx from sanitize.model_info import ModelInfo, ModelList from sanitize.project_config import ModelInfoProject, ModelProjectConfig, WorkflowItem -from sanitize.utils import GlobalVars, isLLM_by_id, iter_aitk_info_yml, open_ex +from sanitize.utils import ( + GlobalVars, + WINML_COPY_EXEMPT_IDS, + isLLM_by_id, + iter_aitk_info_yml, + open_ex, + winml_copy_src_for, +) def fetch_pipeline_tags(model_link: str) -> Optional[List[str]]: """Fetch pipeline_tag from HuggingFace API for a given model link. @@ -222,10 +229,24 @@ def project_processor(): raise KeyError(f"same id found in {yml_file}") all_ids.add(modelInfo.id.lower()) modelList.models.append(modelInfo) - # copy pre + # copy pre — auto-ensure winml.py copy entry (unless exempt), then run pre-phase copies copyConfigFile = yml_file.parent / "_copy.json.config" - if copyConfigFile.exists(): - copyConfig = CopyConfig.Read(copyConfigFile.as_posix()) + copyConfig: CopyConfig | None = ( + CopyConfig.Read(copyConfigFile.as_posix()) if copyConfigFile.exists() else None + ) + if modelInfo.id not in WINML_COPY_EXEMPT_IDS: + desired_src = winml_copy_src_for(modelInfo.id) + if copyConfig is None: + copyConfig = CopyConfig() + copyConfig._file = str(copyConfigFile) + copyConfig._fileContent = None + existing = next((c for c in copyConfig.copies if c.dst == "winml.py"), None) + if existing is None: + copyConfig.copies.append(Copy(src=desired_src, dst="winml.py")) + elif existing.src != desired_src: + existing.src = desired_src + GlobalVars.winmlCopyCheck += 1 + if copyConfig is not None: copyConfig.process(yml_file.parent.as_posix(), pre=True) copyConfig.writeIfChanged() # model summary diff --git a/.aitk/scripts/sanitize/main.py b/.aitk/scripts/sanitize/main.py index 75cb4b9ed..ea7b2d2be 100644 --- a/.aitk/scripts/sanitize/main.py +++ b/.aitk/scripts/sanitize/main.py @@ -20,13 +20,6 @@ from .project_config import ModelInfoProject, ModelProjectConfig from .utils import GlobalVars, open_ex, printError, printWarning -# Projects exempt from the "_copy.json.config must copy winml.py" rule. -# Typically contains the canonical source of winml.py that others copy from. -WINML_COPY_EXEMPT_IDS = { - "huggingface/Intel/bert-base-uncased-mrpc", - "huggingface/deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B" -} - def shouldCheckModel(rootDir: str, configDir: str, model: ModelInfo) -> str | None: modelDir = os.path.join(rootDir, model.relativePath) if model.relativePath else os.path.join(configDir, model.id) @@ -70,25 +63,13 @@ def main(): version = model.version modelVerDir = modelDir if model.relativePath else os.path.join(modelDir, str(version)) - # process copy + # process copy (post phase — .json.config copies; winml.py is auto-ensured earlier in project_processor) copyConfigFile = os.path.join(modelVerDir, "_copy.json.config") - copyConfig: CopyConfig | None = None if os.path.exists(copyConfigFile): copyConfig = CopyConfig.Read(copyConfigFile) copyConfig.process(modelVerDir, pre=False) copyConfig.writeIfChanged() - # Every non-template, non-extension project must have a _copy.json.config - # with a copy entry for winml.py (so winml.py stays in sync with the canonical - # source at intel-bert-base-uncased-mrpc). Exempt list: WINML_COPY_EXEMPT_IDS. - if not model.template and not model.extension and model.id not in WINML_COPY_EXEMPT_IDS: - if copyConfig is None: - printError(f"{copyConfigFile} not exists (required to copy winml.py)") - elif not any(c.dst == "winml.py" for c in copyConfig.copies): - printError(f"{copyConfigFile} missing a copy entry with dst 'winml.py'") - else: - GlobalVars.winmlCopyCheck += 1 - # check LICENSE if not model.extension and not model.template: licenseFile = os.path.join(modelVerDir, "..", "LICENSE") diff --git a/.aitk/scripts/sanitize/utils.py b/.aitk/scripts/sanitize/utils.py index 032aa826b..706984623 100644 --- a/.aitk/scripts/sanitize/utils.py +++ b/.aitk/scripts/sanitize/utils.py @@ -237,6 +237,23 @@ def isLLM_by_id(id: str) -> bool: return any(check in id for check in check_list) +# Projects that are themselves canonical winml.py sources and should not have +# a winml.py copy entry auto-added to their _copy.json.config. +WINML_COPY_EXEMPT_IDS = { + "huggingface/Intel/bert-base-uncased-mrpc", + "huggingface/deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B", +} + +# Canonical winml.py sources. Paths are relative to the project's aitk folder +# (matches the CopyConfig `src` format). +WINML_SRC_LLM = "../../deepseek-ai-DeepSeek-R1-Distill-Qwen-1.5B/aitk/winml.py" +WINML_SRC_NON_LLM = "../../intel-bert-base-uncased-mrpc/aitk/winml.py" + + +def winml_copy_src_for(model_id: str) -> str: + return WINML_SRC_LLM if isLLM_by_id(model_id) else WINML_SRC_NON_LLM + + # TODO align with Skylight\vscode\ai-mlstudio\src\model-lab\utilities\runtimeUtils.ts def get_execute_runtime(runtime: RuntimeEnum) -> RuntimeEnum: if runtime in [RuntimeEnum.IntelAny, RuntimeEnum.IntelCPU, RuntimeEnum.IntelGPU, RuntimeEnum.IntelNPU]: diff --git a/OFA-Sys-chinese-clip-vit-base-patch16/aitk/inference_sample.ipynb b/OFA-Sys-chinese-clip-vit-base-patch16/aitk/inference_sample.ipynb index 3876ae9d4..957b104ff 100644 --- a/OFA-Sys-chinese-clip-vit-base-patch16/aitk/inference_sample.ipynb +++ b/OFA-Sys-chinese-clip-vit-base-patch16/aitk/inference_sample.ipynb @@ -25,23 +25,7 @@ "metadata": {}, "outputs": [], "source": [ - "# reference: https://learn.microsoft.com/en-us/windows/ai/new-windows-ml/tutorial?tabs=python#acquiring-the-model-and-preprocessing\n", - "import subprocess\n", - "import json\n", - "import sys\n", - "import os\n", - "import onnxruntime as ort\n", - "\n", - "def register_execution_providers():\n", - " worker_script = os.path.abspath('winml.py')\n", - " result = subprocess.check_output([sys.executable, worker_script], text=True)\n", - " paths = json.loads(result)\n", - " for item in paths.items():\n", - " try:\n", - " ort.register_execution_provider_library(item[0], item[1])\n", - " except Exception as e:\n", - " print(f\"Failed to register execution provider {item[0]}: {e}\")\n", - "\n", + "from winml import register_execution_providers\n", "register_execution_providers()" ] }, diff --git a/Qwen-Qwen2.5-0.5B-Instruct/aitk/_copy.json.config b/Qwen-Qwen2.5-0.5B-Instruct/aitk/_copy.json.config index e04be4cf7..c14a92ec9 100644 --- a/Qwen-Qwen2.5-0.5B-Instruct/aitk/_copy.json.config +++ b/Qwen-Qwen2.5-0.5B-Instruct/aitk/_copy.json.config @@ -35,7 +35,7 @@ "dst": "requirements.txt" }, { - "src": "../../intel-bert-base-uncased-mrpc/aitk/winml.py", + "src": "../../deepseek-ai-DeepSeek-R1-Distill-Qwen-1.5B/aitk/winml.py", "dst": "winml.py" } ] diff --git a/Qwen-Qwen2.5-0.5B-Instruct/aitk/winml.py b/Qwen-Qwen2.5-0.5B-Instruct/aitk/winml.py index 4310b7cfb..c13673487 100644 --- a/Qwen-Qwen2.5-0.5B-Instruct/aitk/winml.py +++ b/Qwen-Qwen2.5-0.5B-Instruct/aitk/winml.py @@ -1,13 +1,13 @@ def register_execution_providers(): from windowsml import EpCatalog - import onnxruntime as ort + import onnxruntime_genai as og with EpCatalog() as catalog: for ep in catalog.find_all_providers(): try: # Ensure the provider is ready (downloads/installs if needed) ep.ensure_ready() - ort.register_execution_provider_library(ep.name, ep.library_path) + og.register_execution_provider_library(ep.name, ep.library_path) print(f"Successfully registered execution provider {ep.name} from {ep.library_path}") except Exception as e: print(f"Failed to register execution provider {ep.name} from {ep.library_path}: {e}") diff --git a/Qwen-Qwen2.5-0.5B/aitk/_copy.json.config b/Qwen-Qwen2.5-0.5B/aitk/_copy.json.config index 2cab72f59..b7a75c609 100644 --- a/Qwen-Qwen2.5-0.5B/aitk/_copy.json.config +++ b/Qwen-Qwen2.5-0.5B/aitk/_copy.json.config @@ -6,7 +6,7 @@ "replacements": [] }, { - "src": "../../intel-bert-base-uncased-mrpc/aitk/winml.py", + "src": "../../deepseek-ai-DeepSeek-R1-Distill-Qwen-1.5B/aitk/winml.py", "dst": "winml.py" } ] diff --git a/Qwen-Qwen2.5-0.5B/aitk/winml.py b/Qwen-Qwen2.5-0.5B/aitk/winml.py index 4310b7cfb..c13673487 100644 --- a/Qwen-Qwen2.5-0.5B/aitk/winml.py +++ b/Qwen-Qwen2.5-0.5B/aitk/winml.py @@ -1,13 +1,13 @@ def register_execution_providers(): from windowsml import EpCatalog - import onnxruntime as ort + import onnxruntime_genai as og with EpCatalog() as catalog: for ep in catalog.find_all_providers(): try: # Ensure the provider is ready (downloads/installs if needed) ep.ensure_ready() - ort.register_execution_provider_library(ep.name, ep.library_path) + og.register_execution_provider_library(ep.name, ep.library_path) print(f"Successfully registered execution provider {ep.name} from {ep.library_path}") except Exception as e: print(f"Failed to register execution provider {ep.name} from {ep.library_path}: {e}") diff --git a/Qwen-Qwen2.5-1.5B-Instruct/aitk/_copy.json.config b/Qwen-Qwen2.5-1.5B-Instruct/aitk/_copy.json.config index 6a6e71a41..d5d6e0975 100644 --- a/Qwen-Qwen2.5-1.5B-Instruct/aitk/_copy.json.config +++ b/Qwen-Qwen2.5-1.5B-Instruct/aitk/_copy.json.config @@ -62,7 +62,7 @@ ] }, { - "src": "../../intel-bert-base-uncased-mrpc/aitk/winml.py", + "src": "../../deepseek-ai-DeepSeek-R1-Distill-Qwen-1.5B/aitk/winml.py", "dst": "winml.py" } ] diff --git a/Qwen-Qwen2.5-1.5B-Instruct/aitk/winml.py b/Qwen-Qwen2.5-1.5B-Instruct/aitk/winml.py index 4310b7cfb..c13673487 100644 --- a/Qwen-Qwen2.5-1.5B-Instruct/aitk/winml.py +++ b/Qwen-Qwen2.5-1.5B-Instruct/aitk/winml.py @@ -1,13 +1,13 @@ def register_execution_providers(): from windowsml import EpCatalog - import onnxruntime as ort + import onnxruntime_genai as og with EpCatalog() as catalog: for ep in catalog.find_all_providers(): try: # Ensure the provider is ready (downloads/installs if needed) ep.ensure_ready() - ort.register_execution_provider_library(ep.name, ep.library_path) + og.register_execution_provider_library(ep.name, ep.library_path) print(f"Successfully registered execution provider {ep.name} from {ep.library_path}") except Exception as e: print(f"Failed to register execution provider {ep.name} from {ep.library_path}: {e}") diff --git a/Qwen-Qwen2.5-14B-Instruct/aitk/_copy.json.config b/Qwen-Qwen2.5-14B-Instruct/aitk/_copy.json.config index 1e4e9c82c..3f16ba990 100644 --- a/Qwen-Qwen2.5-14B-Instruct/aitk/_copy.json.config +++ b/Qwen-Qwen2.5-14B-Instruct/aitk/_copy.json.config @@ -39,7 +39,7 @@ "dst": "requirements.txt" }, { - "src": "../../intel-bert-base-uncased-mrpc/aitk/winml.py", + "src": "../../deepseek-ai-DeepSeek-R1-Distill-Qwen-1.5B/aitk/winml.py", "dst": "winml.py" }, { diff --git a/Qwen-Qwen2.5-14B-Instruct/aitk/winml.py b/Qwen-Qwen2.5-14B-Instruct/aitk/winml.py index 4310b7cfb..c13673487 100644 --- a/Qwen-Qwen2.5-14B-Instruct/aitk/winml.py +++ b/Qwen-Qwen2.5-14B-Instruct/aitk/winml.py @@ -1,13 +1,13 @@ def register_execution_providers(): from windowsml import EpCatalog - import onnxruntime as ort + import onnxruntime_genai as og with EpCatalog() as catalog: for ep in catalog.find_all_providers(): try: # Ensure the provider is ready (downloads/installs if needed) ep.ensure_ready() - ort.register_execution_provider_library(ep.name, ep.library_path) + og.register_execution_provider_library(ep.name, ep.library_path) print(f"Successfully registered execution provider {ep.name} from {ep.library_path}") except Exception as e: print(f"Failed to register execution provider {ep.name} from {ep.library_path}: {e}") diff --git a/Qwen-Qwen2.5-3B-Instruct/aitk/_copy.json.config b/Qwen-Qwen2.5-3B-Instruct/aitk/_copy.json.config index c3adb4587..7d12a5e65 100644 --- a/Qwen-Qwen2.5-3B-Instruct/aitk/_copy.json.config +++ b/Qwen-Qwen2.5-3B-Instruct/aitk/_copy.json.config @@ -25,7 +25,7 @@ "dst": "requirements.txt" }, { - "src": "../../intel-bert-base-uncased-mrpc/aitk/winml.py", + "src": "../../deepseek-ai-DeepSeek-R1-Distill-Qwen-1.5B/aitk/winml.py", "dst": "winml.py" }, { diff --git a/Qwen-Qwen2.5-3B-Instruct/aitk/winml.py b/Qwen-Qwen2.5-3B-Instruct/aitk/winml.py index 4310b7cfb..c13673487 100644 --- a/Qwen-Qwen2.5-3B-Instruct/aitk/winml.py +++ b/Qwen-Qwen2.5-3B-Instruct/aitk/winml.py @@ -1,13 +1,13 @@ def register_execution_providers(): from windowsml import EpCatalog - import onnxruntime as ort + import onnxruntime_genai as og with EpCatalog() as catalog: for ep in catalog.find_all_providers(): try: # Ensure the provider is ready (downloads/installs if needed) ep.ensure_ready() - ort.register_execution_provider_library(ep.name, ep.library_path) + og.register_execution_provider_library(ep.name, ep.library_path) print(f"Successfully registered execution provider {ep.name} from {ep.library_path}") except Exception as e: print(f"Failed to register execution provider {ep.name} from {ep.library_path}: {e}") diff --git a/Qwen-Qwen2.5-7B-Instruct/aitk/_copy.json.config b/Qwen-Qwen2.5-7B-Instruct/aitk/_copy.json.config index 1cc6a7e6e..942273488 100644 --- a/Qwen-Qwen2.5-7B-Instruct/aitk/_copy.json.config +++ b/Qwen-Qwen2.5-7B-Instruct/aitk/_copy.json.config @@ -15,7 +15,7 @@ ] }, { - "src": "../../intel-bert-base-uncased-mrpc/aitk/winml.py", + "src": "../../deepseek-ai-DeepSeek-R1-Distill-Qwen-1.5B/aitk/winml.py", "dst": "winml.py" } ] diff --git a/Qwen-Qwen2.5-7B-Instruct/aitk/winml.py b/Qwen-Qwen2.5-7B-Instruct/aitk/winml.py index 4310b7cfb..c13673487 100644 --- a/Qwen-Qwen2.5-7B-Instruct/aitk/winml.py +++ b/Qwen-Qwen2.5-7B-Instruct/aitk/winml.py @@ -1,13 +1,13 @@ def register_execution_providers(): from windowsml import EpCatalog - import onnxruntime as ort + import onnxruntime_genai as og with EpCatalog() as catalog: for ep in catalog.find_all_providers(): try: # Ensure the provider is ready (downloads/installs if needed) ep.ensure_ready() - ort.register_execution_provider_library(ep.name, ep.library_path) + og.register_execution_provider_library(ep.name, ep.library_path) print(f"Successfully registered execution provider {ep.name} from {ep.library_path}") except Exception as e: print(f"Failed to register execution provider {ep.name} from {ep.library_path}: {e}") diff --git a/Qwen-Qwen2.5-Coder-0.5B-Instruct/aitk/_copy.json.config b/Qwen-Qwen2.5-Coder-0.5B-Instruct/aitk/_copy.json.config index 5e5c0b5ef..ac38b3e07 100644 --- a/Qwen-Qwen2.5-Coder-0.5B-Instruct/aitk/_copy.json.config +++ b/Qwen-Qwen2.5-Coder-0.5B-Instruct/aitk/_copy.json.config @@ -35,7 +35,7 @@ "dst": "requirements.txt" }, { - "src": "../../intel-bert-base-uncased-mrpc/aitk/winml.py", + "src": "../../deepseek-ai-DeepSeek-R1-Distill-Qwen-1.5B/aitk/winml.py", "dst": "winml.py" } ] diff --git a/Qwen-Qwen2.5-Coder-0.5B-Instruct/aitk/winml.py b/Qwen-Qwen2.5-Coder-0.5B-Instruct/aitk/winml.py index 4310b7cfb..c13673487 100644 --- a/Qwen-Qwen2.5-Coder-0.5B-Instruct/aitk/winml.py +++ b/Qwen-Qwen2.5-Coder-0.5B-Instruct/aitk/winml.py @@ -1,13 +1,13 @@ def register_execution_providers(): from windowsml import EpCatalog - import onnxruntime as ort + import onnxruntime_genai as og with EpCatalog() as catalog: for ep in catalog.find_all_providers(): try: # Ensure the provider is ready (downloads/installs if needed) ep.ensure_ready() - ort.register_execution_provider_library(ep.name, ep.library_path) + og.register_execution_provider_library(ep.name, ep.library_path) print(f"Successfully registered execution provider {ep.name} from {ep.library_path}") except Exception as e: print(f"Failed to register execution provider {ep.name} from {ep.library_path}: {e}") diff --git a/Qwen-Qwen2.5-Coder-1.5B-Instruct/aitk/_copy.json.config b/Qwen-Qwen2.5-Coder-1.5B-Instruct/aitk/_copy.json.config index ee710c310..9c36f1a7c 100644 --- a/Qwen-Qwen2.5-Coder-1.5B-Instruct/aitk/_copy.json.config +++ b/Qwen-Qwen2.5-Coder-1.5B-Instruct/aitk/_copy.json.config @@ -35,7 +35,7 @@ "dst": "requirements.txt" }, { - "src": "../../intel-bert-base-uncased-mrpc/aitk/winml.py", + "src": "../../deepseek-ai-DeepSeek-R1-Distill-Qwen-1.5B/aitk/winml.py", "dst": "winml.py" } ] diff --git a/Qwen-Qwen2.5-Coder-1.5B-Instruct/aitk/winml.py b/Qwen-Qwen2.5-Coder-1.5B-Instruct/aitk/winml.py index 4310b7cfb..c13673487 100644 --- a/Qwen-Qwen2.5-Coder-1.5B-Instruct/aitk/winml.py +++ b/Qwen-Qwen2.5-Coder-1.5B-Instruct/aitk/winml.py @@ -1,13 +1,13 @@ def register_execution_providers(): from windowsml import EpCatalog - import onnxruntime as ort + import onnxruntime_genai as og with EpCatalog() as catalog: for ep in catalog.find_all_providers(): try: # Ensure the provider is ready (downloads/installs if needed) ep.ensure_ready() - ort.register_execution_provider_library(ep.name, ep.library_path) + og.register_execution_provider_library(ep.name, ep.library_path) print(f"Successfully registered execution provider {ep.name} from {ep.library_path}") except Exception as e: print(f"Failed to register execution provider {ep.name} from {ep.library_path}: {e}") diff --git a/Qwen-Qwen2.5-Coder-14B-Instruct/aitk/_copy.json.config b/Qwen-Qwen2.5-Coder-14B-Instruct/aitk/_copy.json.config index 0076c5054..544821aa0 100644 --- a/Qwen-Qwen2.5-Coder-14B-Instruct/aitk/_copy.json.config +++ b/Qwen-Qwen2.5-Coder-14B-Instruct/aitk/_copy.json.config @@ -29,7 +29,7 @@ "dst": "requirements.txt" }, { - "src": "../../intel-bert-base-uncased-mrpc/aitk/winml.py", + "src": "../../deepseek-ai-DeepSeek-R1-Distill-Qwen-1.5B/aitk/winml.py", "dst": "winml.py" }, { diff --git a/Qwen-Qwen2.5-Coder-14B-Instruct/aitk/winml.py b/Qwen-Qwen2.5-Coder-14B-Instruct/aitk/winml.py index 4310b7cfb..c13673487 100644 --- a/Qwen-Qwen2.5-Coder-14B-Instruct/aitk/winml.py +++ b/Qwen-Qwen2.5-Coder-14B-Instruct/aitk/winml.py @@ -1,13 +1,13 @@ def register_execution_providers(): from windowsml import EpCatalog - import onnxruntime as ort + import onnxruntime_genai as og with EpCatalog() as catalog: for ep in catalog.find_all_providers(): try: # Ensure the provider is ready (downloads/installs if needed) ep.ensure_ready() - ort.register_execution_provider_library(ep.name, ep.library_path) + og.register_execution_provider_library(ep.name, ep.library_path) print(f"Successfully registered execution provider {ep.name} from {ep.library_path}") except Exception as e: print(f"Failed to register execution provider {ep.name} from {ep.library_path}: {e}") diff --git a/Qwen-Qwen2.5-Coder-3B-Instruct/aitk/_copy.json.config b/Qwen-Qwen2.5-Coder-3B-Instruct/aitk/_copy.json.config index 5e041affe..70d268c9e 100644 --- a/Qwen-Qwen2.5-Coder-3B-Instruct/aitk/_copy.json.config +++ b/Qwen-Qwen2.5-Coder-3B-Instruct/aitk/_copy.json.config @@ -25,7 +25,7 @@ "dst": "requirements.txt" }, { - "src": "../../intel-bert-base-uncased-mrpc/aitk/winml.py", + "src": "../../deepseek-ai-DeepSeek-R1-Distill-Qwen-1.5B/aitk/winml.py", "dst": "winml.py" }, { diff --git a/Qwen-Qwen2.5-Coder-3B-Instruct/aitk/winml.py b/Qwen-Qwen2.5-Coder-3B-Instruct/aitk/winml.py index 4310b7cfb..c13673487 100644 --- a/Qwen-Qwen2.5-Coder-3B-Instruct/aitk/winml.py +++ b/Qwen-Qwen2.5-Coder-3B-Instruct/aitk/winml.py @@ -1,13 +1,13 @@ def register_execution_providers(): from windowsml import EpCatalog - import onnxruntime as ort + import onnxruntime_genai as og with EpCatalog() as catalog: for ep in catalog.find_all_providers(): try: # Ensure the provider is ready (downloads/installs if needed) ep.ensure_ready() - ort.register_execution_provider_library(ep.name, ep.library_path) + og.register_execution_provider_library(ep.name, ep.library_path) print(f"Successfully registered execution provider {ep.name} from {ep.library_path}") except Exception as e: print(f"Failed to register execution provider {ep.name} from {ep.library_path}: {e}") diff --git a/Qwen-Qwen2.5-Coder-7B-Instruct/aitk/_copy.json.config b/Qwen-Qwen2.5-Coder-7B-Instruct/aitk/_copy.json.config index 262a86fe1..e09e76aeb 100644 --- a/Qwen-Qwen2.5-Coder-7B-Instruct/aitk/_copy.json.config +++ b/Qwen-Qwen2.5-Coder-7B-Instruct/aitk/_copy.json.config @@ -35,7 +35,7 @@ "dst": "requirements.txt" }, { - "src": "../../intel-bert-base-uncased-mrpc/aitk/winml.py", + "src": "../../deepseek-ai-DeepSeek-R1-Distill-Qwen-1.5B/aitk/winml.py", "dst": "winml.py" } ] diff --git a/Qwen-Qwen2.5-Coder-7B-Instruct/aitk/winml.py b/Qwen-Qwen2.5-Coder-7B-Instruct/aitk/winml.py index 4310b7cfb..c13673487 100644 --- a/Qwen-Qwen2.5-Coder-7B-Instruct/aitk/winml.py +++ b/Qwen-Qwen2.5-Coder-7B-Instruct/aitk/winml.py @@ -1,13 +1,13 @@ def register_execution_providers(): from windowsml import EpCatalog - import onnxruntime as ort + import onnxruntime_genai as og with EpCatalog() as catalog: for ep in catalog.find_all_providers(): try: # Ensure the provider is ready (downloads/installs if needed) ep.ensure_ready() - ort.register_execution_provider_library(ep.name, ep.library_path) + og.register_execution_provider_library(ep.name, ep.library_path) print(f"Successfully registered execution provider {ep.name} from {ep.library_path}") except Exception as e: print(f"Failed to register execution provider {ep.name} from {ep.library_path}: {e}") diff --git a/deepseek-ai-DeepSeek-R1-Distill-Llama-8B/aitk/_copy.json.config b/deepseek-ai-DeepSeek-R1-Distill-Llama-8B/aitk/_copy.json.config index eb196e23f..b995b80a5 100644 --- a/deepseek-ai-DeepSeek-R1-Distill-Llama-8B/aitk/_copy.json.config +++ b/deepseek-ai-DeepSeek-R1-Distill-Llama-8B/aitk/_copy.json.config @@ -11,7 +11,7 @@ ] }, { - "src": "../../intel-bert-base-uncased-mrpc/aitk/winml.py", + "src": "../../deepseek-ai-DeepSeek-R1-Distill-Qwen-1.5B/aitk/winml.py", "dst": "winml.py" } ] diff --git a/deepseek-ai-DeepSeek-R1-Distill-Llama-8B/aitk/winml.py b/deepseek-ai-DeepSeek-R1-Distill-Llama-8B/aitk/winml.py index 4310b7cfb..c13673487 100644 --- a/deepseek-ai-DeepSeek-R1-Distill-Llama-8B/aitk/winml.py +++ b/deepseek-ai-DeepSeek-R1-Distill-Llama-8B/aitk/winml.py @@ -1,13 +1,13 @@ def register_execution_providers(): from windowsml import EpCatalog - import onnxruntime as ort + import onnxruntime_genai as og with EpCatalog() as catalog: for ep in catalog.find_all_providers(): try: # Ensure the provider is ready (downloads/installs if needed) ep.ensure_ready() - ort.register_execution_provider_library(ep.name, ep.library_path) + og.register_execution_provider_library(ep.name, ep.library_path) print(f"Successfully registered execution provider {ep.name} from {ep.library_path}") except Exception as e: print(f"Failed to register execution provider {ep.name} from {ep.library_path}: {e}") diff --git a/deepseek-ai-DeepSeek-R1-Distill-Qwen-14B/aitk/_copy.json.config b/deepseek-ai-DeepSeek-R1-Distill-Qwen-14B/aitk/_copy.json.config index ff21a3188..cb65435df 100644 --- a/deepseek-ai-DeepSeek-R1-Distill-Qwen-14B/aitk/_copy.json.config +++ b/deepseek-ai-DeepSeek-R1-Distill-Qwen-14B/aitk/_copy.json.config @@ -25,7 +25,7 @@ ] }, { - "src": "../../intel-bert-base-uncased-mrpc/aitk/winml.py", + "src": "../../deepseek-ai-DeepSeek-R1-Distill-Qwen-1.5B/aitk/winml.py", "dst": "winml.py" }, { diff --git a/deepseek-ai-DeepSeek-R1-Distill-Qwen-14B/aitk/winml.py b/deepseek-ai-DeepSeek-R1-Distill-Qwen-14B/aitk/winml.py index 4310b7cfb..c13673487 100644 --- a/deepseek-ai-DeepSeek-R1-Distill-Qwen-14B/aitk/winml.py +++ b/deepseek-ai-DeepSeek-R1-Distill-Qwen-14B/aitk/winml.py @@ -1,13 +1,13 @@ def register_execution_providers(): from windowsml import EpCatalog - import onnxruntime as ort + import onnxruntime_genai as og with EpCatalog() as catalog: for ep in catalog.find_all_providers(): try: # Ensure the provider is ready (downloads/installs if needed) ep.ensure_ready() - ort.register_execution_provider_library(ep.name, ep.library_path) + og.register_execution_provider_library(ep.name, ep.library_path) print(f"Successfully registered execution provider {ep.name} from {ep.library_path}") except Exception as e: print(f"Failed to register execution provider {ep.name} from {ep.library_path}: {e}") diff --git a/deepseek-ai-DeepSeek-R1-Distill-Qwen-7B/aitk/_copy.json.config b/deepseek-ai-DeepSeek-R1-Distill-Qwen-7B/aitk/_copy.json.config index eb196e23f..b995b80a5 100644 --- a/deepseek-ai-DeepSeek-R1-Distill-Qwen-7B/aitk/_copy.json.config +++ b/deepseek-ai-DeepSeek-R1-Distill-Qwen-7B/aitk/_copy.json.config @@ -11,7 +11,7 @@ ] }, { - "src": "../../intel-bert-base-uncased-mrpc/aitk/winml.py", + "src": "../../deepseek-ai-DeepSeek-R1-Distill-Qwen-1.5B/aitk/winml.py", "dst": "winml.py" } ] diff --git a/deepseek-ai-DeepSeek-R1-Distill-Qwen-7B/aitk/winml.py b/deepseek-ai-DeepSeek-R1-Distill-Qwen-7B/aitk/winml.py index 4310b7cfb..c13673487 100644 --- a/deepseek-ai-DeepSeek-R1-Distill-Qwen-7B/aitk/winml.py +++ b/deepseek-ai-DeepSeek-R1-Distill-Qwen-7B/aitk/winml.py @@ -1,13 +1,13 @@ def register_execution_providers(): from windowsml import EpCatalog - import onnxruntime as ort + import onnxruntime_genai as og with EpCatalog() as catalog: for ep in catalog.find_all_providers(): try: # Ensure the provider is ready (downloads/installs if needed) ep.ensure_ready() - ort.register_execution_provider_library(ep.name, ep.library_path) + og.register_execution_provider_library(ep.name, ep.library_path) print(f"Successfully registered execution provider {ep.name} from {ep.library_path}") except Exception as e: print(f"Failed to register execution provider {ep.name} from {ep.library_path}: {e}") diff --git a/meta-llama-Llama-3.1-8B-Instruct/aitk/_copy.json.config b/meta-llama-Llama-3.1-8B-Instruct/aitk/_copy.json.config index 816fa0472..9c433fa10 100644 --- a/meta-llama-Llama-3.1-8B-Instruct/aitk/_copy.json.config +++ b/meta-llama-Llama-3.1-8B-Instruct/aitk/_copy.json.config @@ -44,7 +44,7 @@ ] }, { - "src": "../../intel-bert-base-uncased-mrpc/aitk/winml.py", + "src": "../../deepseek-ai-DeepSeek-R1-Distill-Qwen-1.5B/aitk/winml.py", "dst": "winml.py" } ] diff --git a/meta-llama-Llama-3.1-8B-Instruct/aitk/winml.py b/meta-llama-Llama-3.1-8B-Instruct/aitk/winml.py index 4310b7cfb..c13673487 100644 --- a/meta-llama-Llama-3.1-8B-Instruct/aitk/winml.py +++ b/meta-llama-Llama-3.1-8B-Instruct/aitk/winml.py @@ -1,13 +1,13 @@ def register_execution_providers(): from windowsml import EpCatalog - import onnxruntime as ort + import onnxruntime_genai as og with EpCatalog() as catalog: for ep in catalog.find_all_providers(): try: # Ensure the provider is ready (downloads/installs if needed) ep.ensure_ready() - ort.register_execution_provider_library(ep.name, ep.library_path) + og.register_execution_provider_library(ep.name, ep.library_path) print(f"Successfully registered execution provider {ep.name} from {ep.library_path}") except Exception as e: print(f"Failed to register execution provider {ep.name} from {ep.library_path}: {e}") diff --git a/meta-llama-Llama-3.2-1B-Instruct/aitk/_copy.json.config b/meta-llama-Llama-3.2-1B-Instruct/aitk/_copy.json.config index d539528bc..607b92270 100644 --- a/meta-llama-Llama-3.2-1B-Instruct/aitk/_copy.json.config +++ b/meta-llama-Llama-3.2-1B-Instruct/aitk/_copy.json.config @@ -76,7 +76,7 @@ ] }, { - "src": "../../intel-bert-base-uncased-mrpc/aitk/winml.py", + "src": "../../deepseek-ai-DeepSeek-R1-Distill-Qwen-1.5B/aitk/winml.py", "dst": "winml.py" } ] diff --git a/meta-llama-Llama-3.2-1B-Instruct/aitk/winml.py b/meta-llama-Llama-3.2-1B-Instruct/aitk/winml.py index 4310b7cfb..c13673487 100644 --- a/meta-llama-Llama-3.2-1B-Instruct/aitk/winml.py +++ b/meta-llama-Llama-3.2-1B-Instruct/aitk/winml.py @@ -1,13 +1,13 @@ def register_execution_providers(): from windowsml import EpCatalog - import onnxruntime as ort + import onnxruntime_genai as og with EpCatalog() as catalog: for ep in catalog.find_all_providers(): try: # Ensure the provider is ready (downloads/installs if needed) ep.ensure_ready() - ort.register_execution_provider_library(ep.name, ep.library_path) + og.register_execution_provider_library(ep.name, ep.library_path) print(f"Successfully registered execution provider {ep.name} from {ep.library_path}") except Exception as e: print(f"Failed to register execution provider {ep.name} from {ep.library_path}: {e}") diff --git a/microsoft-Phi-3-mini-128k-instruct/aitk/_copy.json.config b/microsoft-Phi-3-mini-128k-instruct/aitk/_copy.json.config index 76371a45d..fcc53c789 100644 --- a/microsoft-Phi-3-mini-128k-instruct/aitk/_copy.json.config +++ b/microsoft-Phi-3-mini-128k-instruct/aitk/_copy.json.config @@ -15,7 +15,7 @@ ] }, { - "src": "../../intel-bert-base-uncased-mrpc/aitk/winml.py", + "src": "../../deepseek-ai-DeepSeek-R1-Distill-Qwen-1.5B/aitk/winml.py", "dst": "winml.py" }, { diff --git a/microsoft-Phi-3-mini-128k-instruct/aitk/winml.py b/microsoft-Phi-3-mini-128k-instruct/aitk/winml.py index 4310b7cfb..c13673487 100644 --- a/microsoft-Phi-3-mini-128k-instruct/aitk/winml.py +++ b/microsoft-Phi-3-mini-128k-instruct/aitk/winml.py @@ -1,13 +1,13 @@ def register_execution_providers(): from windowsml import EpCatalog - import onnxruntime as ort + import onnxruntime_genai as og with EpCatalog() as catalog: for ep in catalog.find_all_providers(): try: # Ensure the provider is ready (downloads/installs if needed) ep.ensure_ready() - ort.register_execution_provider_library(ep.name, ep.library_path) + og.register_execution_provider_library(ep.name, ep.library_path) print(f"Successfully registered execution provider {ep.name} from {ep.library_path}") except Exception as e: print(f"Failed to register execution provider {ep.name} from {ep.library_path}: {e}") diff --git a/microsoft-Phi-3-mini-4k-instruct/aitk/_copy.json.config b/microsoft-Phi-3-mini-4k-instruct/aitk/_copy.json.config index d5cc8e08c..6695f24a6 100644 --- a/microsoft-Phi-3-mini-4k-instruct/aitk/_copy.json.config +++ b/microsoft-Phi-3-mini-4k-instruct/aitk/_copy.json.config @@ -15,7 +15,7 @@ ] }, { - "src": "../../intel-bert-base-uncased-mrpc/aitk/winml.py", + "src": "../../deepseek-ai-DeepSeek-R1-Distill-Qwen-1.5B/aitk/winml.py", "dst": "winml.py" } ] diff --git a/microsoft-Phi-3-mini-4k-instruct/aitk/winml.py b/microsoft-Phi-3-mini-4k-instruct/aitk/winml.py index 4310b7cfb..c13673487 100644 --- a/microsoft-Phi-3-mini-4k-instruct/aitk/winml.py +++ b/microsoft-Phi-3-mini-4k-instruct/aitk/winml.py @@ -1,13 +1,13 @@ def register_execution_providers(): from windowsml import EpCatalog - import onnxruntime as ort + import onnxruntime_genai as og with EpCatalog() as catalog: for ep in catalog.find_all_providers(): try: # Ensure the provider is ready (downloads/installs if needed) ep.ensure_ready() - ort.register_execution_provider_library(ep.name, ep.library_path) + og.register_execution_provider_library(ep.name, ep.library_path) print(f"Successfully registered execution provider {ep.name} from {ep.library_path}") except Exception as e: print(f"Failed to register execution provider {ep.name} from {ep.library_path}: {e}") diff --git a/microsoft-Phi-3.5-mini-instruct/aitk/_copy.json.config b/microsoft-Phi-3.5-mini-instruct/aitk/_copy.json.config index cee9caa7b..d260de070 100644 --- a/microsoft-Phi-3.5-mini-instruct/aitk/_copy.json.config +++ b/microsoft-Phi-3.5-mini-instruct/aitk/_copy.json.config @@ -48,7 +48,7 @@ ] }, { - "src": "../../intel-bert-base-uncased-mrpc/aitk/winml.py", + "src": "../../deepseek-ai-DeepSeek-R1-Distill-Qwen-1.5B/aitk/winml.py", "dst": "winml.py" } ] diff --git a/microsoft-Phi-3.5-mini-instruct/aitk/winml.py b/microsoft-Phi-3.5-mini-instruct/aitk/winml.py index 4310b7cfb..c13673487 100644 --- a/microsoft-Phi-3.5-mini-instruct/aitk/winml.py +++ b/microsoft-Phi-3.5-mini-instruct/aitk/winml.py @@ -1,13 +1,13 @@ def register_execution_providers(): from windowsml import EpCatalog - import onnxruntime as ort + import onnxruntime_genai as og with EpCatalog() as catalog: for ep in catalog.find_all_providers(): try: # Ensure the provider is ready (downloads/installs if needed) ep.ensure_ready() - ort.register_execution_provider_library(ep.name, ep.library_path) + og.register_execution_provider_library(ep.name, ep.library_path) print(f"Successfully registered execution provider {ep.name} from {ep.library_path}") except Exception as e: print(f"Failed to register execution provider {ep.name} from {ep.library_path}: {e}") diff --git a/microsoft-Phi-4-mini-instruct/aitk/_copy.json.config b/microsoft-Phi-4-mini-instruct/aitk/_copy.json.config index d5cc8e08c..6695f24a6 100644 --- a/microsoft-Phi-4-mini-instruct/aitk/_copy.json.config +++ b/microsoft-Phi-4-mini-instruct/aitk/_copy.json.config @@ -15,7 +15,7 @@ ] }, { - "src": "../../intel-bert-base-uncased-mrpc/aitk/winml.py", + "src": "../../deepseek-ai-DeepSeek-R1-Distill-Qwen-1.5B/aitk/winml.py", "dst": "winml.py" } ] diff --git a/microsoft-Phi-4-mini-instruct/aitk/winml.py b/microsoft-Phi-4-mini-instruct/aitk/winml.py index 4310b7cfb..c13673487 100644 --- a/microsoft-Phi-4-mini-instruct/aitk/winml.py +++ b/microsoft-Phi-4-mini-instruct/aitk/winml.py @@ -1,13 +1,13 @@ def register_execution_providers(): from windowsml import EpCatalog - import onnxruntime as ort + import onnxruntime_genai as og with EpCatalog() as catalog: for ep in catalog.find_all_providers(): try: # Ensure the provider is ready (downloads/installs if needed) ep.ensure_ready() - ort.register_execution_provider_library(ep.name, ep.library_path) + og.register_execution_provider_library(ep.name, ep.library_path) print(f"Successfully registered execution provider {ep.name} from {ep.library_path}") except Exception as e: print(f"Failed to register execution provider {ep.name} from {ep.library_path}: {e}") diff --git a/microsoft-Phi-4-mini-reasoning/aitk/_copy.json.config b/microsoft-Phi-4-mini-reasoning/aitk/_copy.json.config index 6a9c8c8a8..284ed9dc5 100644 --- a/microsoft-Phi-4-mini-reasoning/aitk/_copy.json.config +++ b/microsoft-Phi-4-mini-reasoning/aitk/_copy.json.config @@ -20,7 +20,7 @@ "replacements": [] }, { - "src": "../../intel-bert-base-uncased-mrpc/aitk/winml.py", + "src": "../../deepseek-ai-DeepSeek-R1-Distill-Qwen-1.5B/aitk/winml.py", "dst": "winml.py" } ] diff --git a/microsoft-Phi-4-mini-reasoning/aitk/winml.py b/microsoft-Phi-4-mini-reasoning/aitk/winml.py index 4310b7cfb..c13673487 100644 --- a/microsoft-Phi-4-mini-reasoning/aitk/winml.py +++ b/microsoft-Phi-4-mini-reasoning/aitk/winml.py @@ -1,13 +1,13 @@ def register_execution_providers(): from windowsml import EpCatalog - import onnxruntime as ort + import onnxruntime_genai as og with EpCatalog() as catalog: for ep in catalog.find_all_providers(): try: # Ensure the provider is ready (downloads/installs if needed) ep.ensure_ready() - ort.register_execution_provider_library(ep.name, ep.library_path) + og.register_execution_provider_library(ep.name, ep.library_path) print(f"Successfully registered execution provider {ep.name} from {ep.library_path}") except Exception as e: print(f"Failed to register execution provider {ep.name} from {ep.library_path}: {e}") diff --git a/microsoft-Phi-4-reasoning-plus/aitk/_copy.json.config b/microsoft-Phi-4-reasoning-plus/aitk/_copy.json.config index 6a9c8c8a8..284ed9dc5 100644 --- a/microsoft-Phi-4-reasoning-plus/aitk/_copy.json.config +++ b/microsoft-Phi-4-reasoning-plus/aitk/_copy.json.config @@ -20,7 +20,7 @@ "replacements": [] }, { - "src": "../../intel-bert-base-uncased-mrpc/aitk/winml.py", + "src": "../../deepseek-ai-DeepSeek-R1-Distill-Qwen-1.5B/aitk/winml.py", "dst": "winml.py" } ] diff --git a/microsoft-Phi-4-reasoning-plus/aitk/winml.py b/microsoft-Phi-4-reasoning-plus/aitk/winml.py index 4310b7cfb..c13673487 100644 --- a/microsoft-Phi-4-reasoning-plus/aitk/winml.py +++ b/microsoft-Phi-4-reasoning-plus/aitk/winml.py @@ -1,13 +1,13 @@ def register_execution_providers(): from windowsml import EpCatalog - import onnxruntime as ort + import onnxruntime_genai as og with EpCatalog() as catalog: for ep in catalog.find_all_providers(): try: # Ensure the provider is ready (downloads/installs if needed) ep.ensure_ready() - ort.register_execution_provider_library(ep.name, ep.library_path) + og.register_execution_provider_library(ep.name, ep.library_path) print(f"Successfully registered execution provider {ep.name} from {ep.library_path}") except Exception as e: print(f"Failed to register execution provider {ep.name} from {ep.library_path}: {e}") diff --git a/microsoft-Phi-4-reasoning/aitk/_copy.json.config b/microsoft-Phi-4-reasoning/aitk/_copy.json.config index 6a9c8c8a8..284ed9dc5 100644 --- a/microsoft-Phi-4-reasoning/aitk/_copy.json.config +++ b/microsoft-Phi-4-reasoning/aitk/_copy.json.config @@ -20,7 +20,7 @@ "replacements": [] }, { - "src": "../../intel-bert-base-uncased-mrpc/aitk/winml.py", + "src": "../../deepseek-ai-DeepSeek-R1-Distill-Qwen-1.5B/aitk/winml.py", "dst": "winml.py" } ] diff --git a/microsoft-Phi-4-reasoning/aitk/winml.py b/microsoft-Phi-4-reasoning/aitk/winml.py index 4310b7cfb..c13673487 100644 --- a/microsoft-Phi-4-reasoning/aitk/winml.py +++ b/microsoft-Phi-4-reasoning/aitk/winml.py @@ -1,13 +1,13 @@ def register_execution_providers(): from windowsml import EpCatalog - import onnxruntime as ort + import onnxruntime_genai as og with EpCatalog() as catalog: for ep in catalog.find_all_providers(): try: # Ensure the provider is ready (downloads/installs if needed) ep.ensure_ready() - ort.register_execution_provider_library(ep.name, ep.library_path) + og.register_execution_provider_library(ep.name, ep.library_path) print(f"Successfully registered execution provider {ep.name} from {ep.library_path}") except Exception as e: print(f"Failed to register execution provider {ep.name} from {ep.library_path}: {e}") diff --git a/microsoft-Phi-4/aitk/_copy.json.config b/microsoft-Phi-4/aitk/_copy.json.config index d5cc8e08c..6695f24a6 100644 --- a/microsoft-Phi-4/aitk/_copy.json.config +++ b/microsoft-Phi-4/aitk/_copy.json.config @@ -15,7 +15,7 @@ ] }, { - "src": "../../intel-bert-base-uncased-mrpc/aitk/winml.py", + "src": "../../deepseek-ai-DeepSeek-R1-Distill-Qwen-1.5B/aitk/winml.py", "dst": "winml.py" } ] diff --git a/microsoft-Phi-4/aitk/winml.py b/microsoft-Phi-4/aitk/winml.py index 4310b7cfb..c13673487 100644 --- a/microsoft-Phi-4/aitk/winml.py +++ b/microsoft-Phi-4/aitk/winml.py @@ -1,13 +1,13 @@ def register_execution_providers(): from windowsml import EpCatalog - import onnxruntime as ort + import onnxruntime_genai as og with EpCatalog() as catalog: for ep in catalog.find_all_providers(): try: # Ensure the provider is ready (downloads/installs if needed) ep.ensure_ready() - ort.register_execution_provider_library(ep.name, ep.library_path) + og.register_execution_provider_library(ep.name, ep.library_path) print(f"Successfully registered execution provider {ep.name} from {ep.library_path}") except Exception as e: print(f"Failed to register execution provider {ep.name} from {ep.library_path}: {e}") diff --git a/mistralai-Mistral-7B-Instruct-v0.2/aitk/_copy.json.config b/mistralai-Mistral-7B-Instruct-v0.2/aitk/_copy.json.config index c98d90019..7e8f009ba 100644 --- a/mistralai-Mistral-7B-Instruct-v0.2/aitk/_copy.json.config +++ b/mistralai-Mistral-7B-Instruct-v0.2/aitk/_copy.json.config @@ -15,7 +15,7 @@ ] }, { - "src": "../../intel-bert-base-uncased-mrpc/aitk/winml.py", + "src": "../../deepseek-ai-DeepSeek-R1-Distill-Qwen-1.5B/aitk/winml.py", "dst": "winml.py" } ] diff --git a/mistralai-Mistral-7B-Instruct-v0.2/aitk/winml.py b/mistralai-Mistral-7B-Instruct-v0.2/aitk/winml.py index 4310b7cfb..c13673487 100644 --- a/mistralai-Mistral-7B-Instruct-v0.2/aitk/winml.py +++ b/mistralai-Mistral-7B-Instruct-v0.2/aitk/winml.py @@ -1,13 +1,13 @@ def register_execution_providers(): from windowsml import EpCatalog - import onnxruntime as ort + import onnxruntime_genai as og with EpCatalog() as catalog: for ep in catalog.find_all_providers(): try: # Ensure the provider is ready (downloads/installs if needed) ep.ensure_ready() - ort.register_execution_provider_library(ep.name, ep.library_path) + og.register_execution_provider_library(ep.name, ep.library_path) print(f"Successfully registered execution provider {ep.name} from {ep.library_path}") except Exception as e: print(f"Failed to register execution provider {ep.name} from {ep.library_path}: {e}") diff --git a/mistralai-Mistral-7B-Instruct-v0.3/aitk/_copy.json.config b/mistralai-Mistral-7B-Instruct-v0.3/aitk/_copy.json.config index 1cc6a7e6e..942273488 100644 --- a/mistralai-Mistral-7B-Instruct-v0.3/aitk/_copy.json.config +++ b/mistralai-Mistral-7B-Instruct-v0.3/aitk/_copy.json.config @@ -15,7 +15,7 @@ ] }, { - "src": "../../intel-bert-base-uncased-mrpc/aitk/winml.py", + "src": "../../deepseek-ai-DeepSeek-R1-Distill-Qwen-1.5B/aitk/winml.py", "dst": "winml.py" } ] diff --git a/mistralai-Mistral-7B-Instruct-v0.3/aitk/winml.py b/mistralai-Mistral-7B-Instruct-v0.3/aitk/winml.py index 4310b7cfb..c13673487 100644 --- a/mistralai-Mistral-7B-Instruct-v0.3/aitk/winml.py +++ b/mistralai-Mistral-7B-Instruct-v0.3/aitk/winml.py @@ -1,13 +1,13 @@ def register_execution_providers(): from windowsml import EpCatalog - import onnxruntime as ort + import onnxruntime_genai as og with EpCatalog() as catalog: for ep in catalog.find_all_providers(): try: # Ensure the provider is ready (downloads/installs if needed) ep.ensure_ready() - ort.register_execution_provider_library(ep.name, ep.library_path) + og.register_execution_provider_library(ep.name, ep.library_path) print(f"Successfully registered execution provider {ep.name} from {ep.library_path}") except Exception as e: print(f"Failed to register execution provider {ep.name} from {ep.library_path}: {e}") diff --git a/openai-whisper-large-v3-turbo/aitk/qnn_workflow_inference_sample.ipynb b/openai-whisper-large-v3-turbo/aitk/qnn_workflow_inference_sample.ipynb index 29d04cc66..194e14cef 100644 --- a/openai-whisper-large-v3-turbo/aitk/qnn_workflow_inference_sample.ipynb +++ b/openai-whisper-large-v3-turbo/aitk/qnn_workflow_inference_sample.ipynb @@ -21,24 +21,7 @@ "metadata": {}, "outputs": [], "source": [ - "# reference: https://learn.microsoft.com/en-us/windows/ai/new-windows-ml/tutorial?tabs=python#acquiring-the-model-and-preprocessing\n", - "import subprocess\n", - "import json\n", - "import sys\n", - "import os\n", - "import onnxruntime as ort\n", - "\n", - "def register_execution_providers():\n", - " worker_script = os.path.abspath('winml.py')\n", - " print(worker_script)\n", - " result = subprocess.check_output([sys.executable, worker_script], text=True)\n", - " paths = json.loads(result)\n", - " for item in paths.items():\n", - " try:\n", - " ort.register_execution_provider_library(item[0], item[1])\n", - " except Exception as e:\n", - " print(f\"Failed to register execution provider {item[0]}: {e}\")\n", - "\n", + "from winml import register_execution_providers\n", "register_execution_providers()" ] }, From ae1099b96675424ba7b346a4da705ebc79f8921d Mon Sep 17 00:00:00 2001 From: hualxie Date: Fri, 24 Apr 2026 15:38:16 +0800 Subject: [PATCH 11/12] add checks --- .aitk/configs/checks.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.aitk/configs/checks.json b/.aitk/configs/checks.json index 1f82a30a0..6eb08fbf1 100644 --- a/.aitk/configs/checks.json +++ b/.aitk/configs/checks.json @@ -1,6 +1,6 @@ { "configCheck": 167, - "copyCheck": 184, + "copyCheck": 183, "extensionCheck": 2, "gitignoreCheck": 44, "inferenceModelCheck": 25, @@ -13,5 +13,5 @@ "requirementsCheck": 37, "templateCheck": 3, "venvRequirementsCheck": 17, - "winmlCopyCheck": 40 + "winmlCopyCheck": 39 } From b44bfc41e00a7b87588af0d3387ebf1bd1459033 Mon Sep 17 00:00:00 2001 From: hualxie Date: Mon, 27 Apr 2026 13:32:41 +0800 Subject: [PATCH 12/12] load onnxruntime.dll first Co-authored-by: Copilot --- .../aitk/winml.py | 13 +++++++++++++ intel-bert-base-uncased-mrpc/aitk/winml.py | 13 +++++++++++++ 2 files changed, 26 insertions(+) diff --git a/deepseek-ai-DeepSeek-R1-Distill-Qwen-1.5B/aitk/winml.py b/deepseek-ai-DeepSeek-R1-Distill-Qwen-1.5B/aitk/winml.py index c13673487..2064ac4d7 100644 --- a/deepseek-ai-DeepSeek-R1-Distill-Qwen-1.5B/aitk/winml.py +++ b/deepseek-ai-DeepSeek-R1-Distill-Qwen-1.5B/aitk/winml.py @@ -1,4 +1,17 @@ def register_execution_providers(): + import os + import ctypes + import importlib.util + + # Locate onnxruntime package path without importing it first + ort_spec = importlib.util.find_spec("onnxruntime") + ort_package_path = os.path.dirname(ort_spec.origin) + ort_capi_dir = os.path.join(ort_package_path, "capi") + ort_dll_path = os.path.join(ort_capi_dir, "onnxruntime.dll") + + # Load the onnxruntime DLL because "C:\Windows\System32\onnxruntime.dll" may be exist and loaded first + ctypes.WinDLL(ort_dll_path) + from windowsml import EpCatalog import onnxruntime_genai as og diff --git a/intel-bert-base-uncased-mrpc/aitk/winml.py b/intel-bert-base-uncased-mrpc/aitk/winml.py index 4310b7cfb..2faf54320 100644 --- a/intel-bert-base-uncased-mrpc/aitk/winml.py +++ b/intel-bert-base-uncased-mrpc/aitk/winml.py @@ -1,4 +1,17 @@ def register_execution_providers(): + import os + import ctypes + import importlib.util + + # Locate onnxruntime package path without importing it first + ort_spec = importlib.util.find_spec("onnxruntime") + ort_package_path = os.path.dirname(ort_spec.origin) + ort_capi_dir = os.path.join(ort_package_path, "capi") + ort_dll_path = os.path.join(ort_capi_dir, "onnxruntime.dll") + + # Load the onnxruntime DLL because "C:\Windows\System32\onnxruntime.dll" may be exist and loaded first + ctypes.WinDLL(ort_dll_path) + from windowsml import EpCatalog import onnxruntime as ort