nixpkgs/pkgs/development/python-modules/pytorch-lightning/default.nix
Martin Weinelt afe8ee8b47
python3Packages.torch{,-bin}: rename from pytorch{,-bin}
The proper name for a python package is the one in the setuptools
setup() call, which can also be seen on pypi.

Correct: https://pypi.org/project/torch/
Wrong: https://pypi.org/project/pytorch/

Includes a treewide rename of the attribute and creates aliases for the
old name.
2022-08-30 17:46:57 +02:00

53 lines
1.0 KiB
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, isPy27
, future
, fsspec
, packaging
, pytestCheckHook
, torch
, pyyaml
, tensorboard
, torchmetrics
, tqdm }:
buildPythonPackage rec {
pname = "pytorch-lightning";
version = "1.6.5";
disabled = isPy27;
src = fetchFromGitHub {
owner = "PyTorchLightning";
repo = pname;
rev = "refs/tags/${version}";
hash = "sha256-CgD5g5nhz2DI4gOQyPl8/Cq6wWHzL0ALgOB5SgUOgaI=";
};
propagatedBuildInputs = [
packaging
future
fsspec
torch
pyyaml
tensorboard
torchmetrics
tqdm
];
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" ];
meta = with lib; {
description = "Lightweight PyTorch wrapper for machine learning researchers";
homepage = "https://pytorch-lightning.readthedocs.io";
license = licenses.asl20;
maintainers = with maintainers; [ tbenst ];
};
}