From aa213b6306b20de32df21aa624398a8a2fc614e6 Mon Sep 17 00:00:00 2001 From: Thomas Viehmann Date: Fri, 8 Nov 2024 12:14:28 +0100 Subject: [PATCH] set USE_LIBUV=0 on windows --- src/lightning/fabric/__init__.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lightning/fabric/__init__.py b/src/lightning/fabric/__init__.py index 921d3d61e60fe..d675b21e5d1d2 100644 --- a/src/lightning/fabric/__init__.py +++ b/src/lightning/fabric/__init__.py @@ -2,6 +2,7 @@ import logging import os +import sys from lightning_utilities.core.imports import package_available @@ -26,6 +27,10 @@ # https://github.com/pytorch/pytorch/issues/83973 os.environ["PYTORCH_NVML_BASED_CUDA_CHECK"] = "1" +# see https://github.com/pytorch/pytorch/issues/139990 +if sys.platform == "win32": + os.environ["USE_LIBUV"] = "0" + from lightning.fabric.fabric import Fabric # noqa: E402 from lightning.fabric.utilities.seed import seed_everything # noqa: E402