Update provider documentation and enhance build configurations

- Clarified the bundling of PyTorch CPU providers for Windows and macOS Intel builds in documentation.
- Improved handling of platform-specific dependencies in the build process, including asyncio support for PyInstaller.
- Updated backend logic to gracefully handle missing dependencies and provide clearer error messages.
- Enhanced progress management to ensure compatibility with PyInstaller's async handling.
- Removed unnecessary exclusions from the build scripts for PyTorch providers to streamline the build process.
This commit is contained in:
Jamie Pine
2026-02-01 23:21:27 -08:00
parent 595747c3d0
commit be30a0ac6b
11 changed files with 133 additions and 95 deletions
+10 -4
View File
@@ -49,11 +49,17 @@ class ProgressManager:
queue.put_nowait(progress_data.copy())
except RuntimeError:
# Not in async context (running in background thread)
# Use call_soon_threadsafe to safely put on queue
# Use asyncio.run_coroutine_threadsafe for better PyInstaller compatibility
if self._main_loop and self._main_loop.is_running():
self._main_loop.call_soon_threadsafe(
lambda q=queue, d=progress_data.copy(): q.put_nowait(d) if not q.full() else None
)
async def put_data_async():
try:
queue.put_nowait(progress_data.copy())
except asyncio.QueueFull:
pass # Queue full, drop update
try:
asyncio.run_coroutine_threadsafe(put_data_async(), self._main_loop)
except Exception as e:
logger.warning(f"Failed to schedule progress update: {e}")
else:
logger.debug(f"No main loop available for {model_name}, skipping notification")
except asyncio.QueueFull: