2020-09-25 04:45:31 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2023-01-20 10:41:00 +00:00
|
|
|
, pythonOlder
|
2022-05-18 14:49:53 +00:00
|
|
|
, fsspec
|
2023-01-20 10:41:00 +00:00
|
|
|
, lightning-utilities
|
|
|
|
, numpy
|
2022-05-18 14:49:53 +00:00
|
|
|
, packaging
|
2020-09-25 04:45:31 +00:00
|
|
|
, pyyaml
|
2023-01-20 10:41:00 +00:00
|
|
|
, tensorboardx
|
|
|
|
, torch
|
2022-05-18 14:49:53 +00:00
|
|
|
, torchmetrics
|
2023-01-20 10:41:00 +00:00
|
|
|
, tqdm
|
|
|
|
, traitlets
|
|
|
|
|
|
|
|
# tests
|
|
|
|
, psutil
|
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pytorch-lightning";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "2.2.3";
|
2023-01-20 10:41:00 +00:00
|
|
|
format = "pyproject";
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2023-01-20 10:41:00 +00:00
|
|
|
owner = "Lightning-AI";
|
|
|
|
repo = "pytorch-lightning";
|
2022-06-16 17:23:12 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-5dz4NQZC0tKIYA9omRZAsSlvH5hpyCSmV0yvoRICcqg=";
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
|
|
|
|
2023-01-20 10:41:00 +00:00
|
|
|
preConfigure = ''
|
|
|
|
export PACKAGE_NAME=pytorch
|
|
|
|
'';
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
propagatedBuildInputs = [
|
2022-05-18 14:49:53 +00:00
|
|
|
fsspec
|
2023-01-20 10:41:00 +00:00
|
|
|
numpy
|
|
|
|
packaging
|
2020-09-25 04:45:31 +00:00
|
|
|
pyyaml
|
2023-01-20 10:41:00 +00:00
|
|
|
tensorboardx
|
|
|
|
torch
|
|
|
|
lightning-utilities
|
2022-05-18 14:49:53 +00:00
|
|
|
torchmetrics
|
2020-09-25 04:45:31 +00:00
|
|
|
tqdm
|
2023-01-20 10:41:00 +00:00
|
|
|
traitlets
|
|
|
|
]
|
|
|
|
++ fsspec.optional-dependencies.http;
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2023-01-20 10:41:00 +00:00
|
|
|
psutil
|
|
|
|
pytestCheckHook
|
2020-09-25 04:45:31 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
# Some packages are not in NixPkgs; other tests try to build distributed
|
|
|
|
# models, which doesn't work in the sandbox.
|
|
|
|
doCheck = false;
|
|
|
|
|
2023-01-20 10:41:00 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"pytorch_lightning"
|
|
|
|
];
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Lightweight PyTorch wrapper for machine learning researchers";
|
|
|
|
homepage = "https://pytorch-lightning.readthedocs.io";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ tbenst ];
|
|
|
|
};
|
|
|
|
}
|