depot/third_party/nixpkgs/pkgs/development/python-modules/coqui-trainer/default.nix
Default email d2947cfef0 Project import generated by Copybara.
GitOrigin-RevId: 598f83ebeb2235435189cf84d844b8b73e858e0f
2022-10-06 20:32:54 +02:00

64 lines
1.1 KiB
Nix

{ lib
, buildPythonPackage
, fetchpatch
, fetchFromGitHub
, pythonAtLeast
, coqpit
, fsspec
, torch-bin
, tensorboardx
, protobuf
, pytestCheckHook
, soundfile
, torchvision-bin
}:
let
pname = "coqui-trainer";
version = "0.0.15";
in
buildPythonPackage {
inherit pname version;
format = "pyproject";
src = fetchFromGitHub {
owner = "coqui-ai";
repo = "Trainer";
rev = "refs/tags/v${version}";
hash = "sha256-WBFsQuGnpqOiQW7VFfsk0t7qEBs1ScOChfQFpLmqTz4=";
};
postPatch = ''
sed -i 's/^protobuf.*/protobuf/' requirements.txt
'';
propagatedBuildInputs = [
coqpit
fsspec
torch-bin
soundfile
tensorboardx
protobuf
];
# only one test and that requires training data from the internet
doCheck = false;
checkInputs = [
pytestCheckHook
torchvision-bin
];
pythonImportsCheck = [
"trainer"
];
meta = with lib; {
description = "A general purpose model trainer, as flexible as it gets";
homepage = "https://github.com/coqui-ai/Trainer";
license = licenses.asl20;
maintainers = teams.tts.members;
};
}