diff --git a/pkgs/development/python-modules/torchsnapshot/default.nix b/pkgs/development/python-modules/torchsnapshot/default.nix index c28ce3f55e71..0c055f1089c1 100644 --- a/pkgs/development/python-modules/torchsnapshot/default.nix +++ b/pkgs/development/python-modules/torchsnapshot/default.nix @@ -1,10 +1,12 @@ { lib, buildPythonPackage, - pythonOlder, fetchFromGitHub, + + # build-system setuptools, - wheel, + + # dependencies aiofiles, aiohttp, importlib-metadata, @@ -13,10 +15,10 @@ pyyaml, torch, typing-extensions, + + # tests pytest-asyncio, pytestCheckHook, - pythonAtLeast, - stdenv, }: buildPythonPackage rec { @@ -24,8 +26,6 @@ buildPythonPackage rec { version = "0.1.0"; pyproject = true; - disabled = pythonOlder "3.7"; - src = fetchFromGitHub { owner = "pytorch"; repo = "torchsnapshot"; @@ -35,7 +35,6 @@ buildPythonPackage rec { build-system = [ setuptools - wheel ]; dependencies = [ @@ -56,16 +55,21 @@ buildPythonPackage rec { pytestCheckHook ]; - meta = with lib; { + disabledTests = [ + # torch.distributed.elastic.multiprocessing.errors.ChildFailedError: + # AssertionError: "Socket Timeout" does not match "wait timeout after 5000ms + "test_linear_barrier_timeout" + ]; + + meta = { description = "Performant, memory-efficient checkpointing library for PyTorch applications, designed with large, complex distributed workloads in mind"; homepage = "https://github.com/pytorch/torchsnapshot/"; changelog = "https://github.com/pytorch/torchsnapshot/releases/tag/${version}"; - license = licenses.bsd3; - maintainers = with maintainers; [ GaetanLepage ]; - broken = - # https://github.com/pytorch/torchsnapshot/issues/175 - pythonAtLeast "3.12" + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ GaetanLepage ]; + badPlatforms = [ # ModuleNotFoundError: No module named 'torch._C._distributed_c10d'; 'torch._C' is not a package - || stdenv.hostPlatform.isDarwin; + lib.systems.inspect.patterns.isDarwin + ]; }; }