nixpkgs/pkgs/development/python-modules/torchgpipe/default.nix
adisbladis 02dab4ab5c python3.pkgs.*: Explicitly pass buildPythonPackage format parameter
Long term we should move everything over to `pyproject = true`, but in
the mean time we can work towards deprecating the implicit `format` paremeter.

cc https://github.com/NixOS/nixpkgs/issues/253154
cc @mweinelt @figsoda
2023-12-07 17:46:49 +01:00

43 lines
900 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, pytestCheckHook
, torch
}:
buildPythonPackage rec {
pname = "torchgpipe";
version = "0.0.7";
format = "setuptools";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "kakaobrain";
repo = pname;
rev = "v${version}";
sha256 = "0ki0njhmz1i3pkpr3y6h6ac7p5qh1kih06mknc2s18mfw34f2l55";
};
postPatch = ''
substituteInPlace setup.py \
--replace "'pytest-runner'" ""
'';
propagatedBuildInputs = [ torch ];
nativeCheckInputs = [ pytestCheckHook ];
disabledTests = [
"test_inplace_on_requires_grad"
"test_input_requiring_grad"
];
meta = with lib; {
description = "GPipe implemented in Pytorch and optimized for CUDA rather than TPU";
homepage = "https://torchgpipe.readthedocs.io";
license = licenses.asl20;
maintainers = [ maintainers.bcdarwin ];
};
}