python3Packages.pytorch-lightning: Fix build

This commit is contained in:
Martin Weinelt 2023-01-12 18:45:26 +01:00
parent 2daf31d0aa
commit 9ecd6c4c2d
No known key found for this signature in database
GPG key ID: 87C1E9888F856759

View file

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