075e8c2c4f
This is almost all find-and-replace. I manually edited: * pkgs/development/python-modules/notifications-android-tv/default.nix, * pkgs/servers/home-assistant/default.nix, * pkgs/development/tools/continuous-integration/buildbot/master.nix A few files have not been changed in this PR because they would cause rebuilds. This PR should have 0 rebuilds.
74 lines
1.5 KiB
Nix
74 lines
1.5 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
setuptools,
|
|
# build inputs
|
|
torch,
|
|
numpy,
|
|
ninja,
|
|
# check inputs
|
|
pytestCheckHook,
|
|
parameterized,
|
|
pytest-cov-stub,
|
|
pytest-timeout,
|
|
remote-pdb,
|
|
}:
|
|
let
|
|
pname = "fairscale";
|
|
version = "0.4.13";
|
|
in
|
|
buildPythonPackage {
|
|
inherit pname version;
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "facebookresearch";
|
|
repo = "fairscale";
|
|
tag = "v${version}";
|
|
hash = "sha256-L2Rl/qL6l0OLAofygzJBGQdp/2ZrgDFarwZRjyAR3dw=";
|
|
};
|
|
|
|
# setup.py depends on ninja python dependency, but we have the binary in nixpkgs
|
|
postPatch = ''
|
|
substituteInPlace setup.py \
|
|
--replace 'setup_requires=["ninja"]' 'setup_requires=[]'
|
|
'';
|
|
|
|
nativeBuildInputs = [
|
|
ninja
|
|
setuptools
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
torch
|
|
numpy
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
pytestCheckHook
|
|
parameterized
|
|
pytest-cov-stub
|
|
pytest-timeout
|
|
remote-pdb
|
|
];
|
|
|
|
# Some tests try to build distributed models, which doesn't work in the sandbox.
|
|
doCheck = false;
|
|
|
|
pythonImportsCheck = [ "fairscale" ];
|
|
|
|
meta = {
|
|
description = "PyTorch extensions for high performance and large scale training";
|
|
mainProgram = "wgit";
|
|
homepage = "https://github.com/facebookresearch/fairscale";
|
|
changelog = "https://github.com/facebookresearch/fairscale/releases/tag/v${version}";
|
|
license = with lib.licenses; [
|
|
mit
|
|
asl20
|
|
bsd3
|
|
];
|
|
maintainers = with lib.maintainers; [ happysalada ];
|
|
};
|
|
}
|