depot/third_party/nixpkgs/pkgs/development/python-modules/pytorch-lightning/default.nix
Default email f34ce41345 Project import generated by Copybara.
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
2024-07-27 08:49:29 +02:00

71 lines
1.4 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
fsspec,
lightning-utilities,
numpy,
packaging,
pyyaml,
setuptools,
tensorboardx,
torch,
torchmetrics,
tqdm,
traitlets,
# tests
psutil,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "pytorch-lightning";
version = "2.3.3";
pyproject = true;
src = fetchFromGitHub {
owner = "Lightning-AI";
repo = "pytorch-lightning";
rev = "refs/tags/${version}";
hash = "sha256-JgT+OiBToBBa3h556gF+kmcqLKLaK17tlTPokvEDyUE=";
};
preConfigure = ''
export PACKAGE_NAME=pytorch
'';
build-system = [ setuptools ];
dependencies = [
fsspec
numpy
packaging
pyyaml
tensorboardx
torch
lightning-utilities
torchmetrics
tqdm
traitlets
] ++ fsspec.optional-dependencies.http;
nativeCheckInputs = [
psutil
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" ];
meta = with lib; {
description = "Lightweight PyTorch wrapper for machine learning researchers";
homepage = "https://github.com/Lightning-AI/pytorch-lightning";
changelog = "https://github.com/Lightning-AI/pytorch-lightning/releases/tag/${src.rev}";
license = licenses.asl20;
maintainers = with maintainers; [ tbenst ];
};
}