diff --git a/pkgs/development/python-modules/pytorch-lightning/default.nix b/pkgs/development/python-modules/pytorch-lightning/default.nix index 55e580308aa..b5957968ba5 100644 --- a/pkgs/development/python-modules/pytorch-lightning/default.nix +++ b/pkgs/development/python-modules/pytorch-lightning/default.nix @@ -1,47 +1,65 @@ { lib , buildPythonPackage , fetchFromGitHub -, isPy27 -, future +, pythonOlder , fsspec +, lightning-utilities +, numpy , packaging -, pytestCheckHook -, torch , pyyaml -, tensorboard +, tensorboardx +, torch , torchmetrics -, tqdm }: +, tqdm +, traitlets + +# tests +, psutil +, pytestCheckHook +}: buildPythonPackage rec { pname = "pytorch-lightning"; version = "1.8.6"; - - disabled = isPy27; + format = "pyproject"; src = fetchFromGitHub { - owner = "PyTorchLightning"; - repo = pname; + owner = "Lightning-AI"; + repo = "pytorch-lightning"; rev = "refs/tags/${version}"; hash = "sha256-5AyOCeRFiV7rdmoBPx03Xju6eTR/3jiE+HQBiEmdzmo="; }; + preConfigure = '' + export PACKAGE_NAME=pytorch + ''; + propagatedBuildInputs = [ - packaging - future fsspec - torch + numpy + packaging pyyaml - tensorboard + tensorboardx + torch + lightning-utilities torchmetrics tqdm + traitlets + ] + ++ fsspec.optional-dependencies.http; + + checkInputs = [ + psutil + pytestCheckHook ]; - checkInputs = [ pytestCheckHook ]; # Some packages are not in NixPkgs; other tests try to build distributed # models, which doesn't work in the sandbox. doCheck = false; - pythonImportsCheck = [ "pytorch_lightning" ]; + pythonImportsCheck = [ + "pytorch_lightning" + ]; meta = with lib; { description = "Lightweight PyTorch wrapper for machine learning researchers";