nixpkgs/pkgs/development/python-modules/peft/default.nix
2023-03-31 11:28:53 -04:00

55 lines
1.0 KiB
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, pytestCheckHook
, setuptools
, numpy
, packaging
, psutil
, pyyaml
, torch
, transformers
, accelerate
}:
buildPythonPackage rec {
pname = "peft";
version = "0.2.0";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "huggingface";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-NPpY29HMQe5KT0JdlLAXY9MVycDslbP2i38NSTirB3I=";
};
nativeBuildInputs = [ setuptools ];
propagatedBuildInputs = [
numpy
packaging
psutil
pyyaml
torch
transformers
accelerate
];
doCheck = false; # tried to download pretrained model
pythonImportsCheck = [
"peft"
];
meta = with lib; {
homepage = "https://github.com/huggingface/peft";
description = "State-of-the art parameter-efficient fine tuning";
changelog = "https://github.com/huggingface/peft/releases/tag/v${version}";
license = licenses.asl20;
maintainers = with maintainers; [ bcdarwin ];
};
}