2022-03-10 19:12:11 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2022-03-30 09:31:56 +00:00
|
|
|
, fetchpatch
|
2022-03-10 19:12:11 +00:00
|
|
|
, fetchFromGitHub
|
2022-03-30 09:31:56 +00:00
|
|
|
, pythonAtLeast
|
2022-03-10 19:12:11 +00:00
|
|
|
|
|
|
|
, coqpit
|
|
|
|
, fsspec
|
2022-09-09 14:08:57 +00:00
|
|
|
, torch-bin
|
2022-07-14 12:49:19 +00:00
|
|
|
, tensorboardx
|
|
|
|
, protobuf
|
2022-03-10 19:12:11 +00:00
|
|
|
|
|
|
|
, pytestCheckHook
|
|
|
|
, soundfile
|
2022-03-30 09:31:56 +00:00
|
|
|
, torchvision-bin
|
2022-03-10 19:12:11 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
2022-11-21 17:40:18 +00:00
|
|
|
pname = "trainer";
|
2023-01-20 10:41:00 +00:00
|
|
|
version = "0.0.20";
|
2022-03-10 19:12:11 +00:00
|
|
|
in
|
|
|
|
buildPythonPackage {
|
|
|
|
inherit pname version;
|
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "coqui-ai";
|
|
|
|
repo = "Trainer";
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-01-20 10:41:00 +00:00
|
|
|
hash = "sha256-se2Q2wJyynPc/3TkfEn4nEh+emqBJBwPGDSnOV+sH4I=";
|
2022-03-10 19:12:11 +00:00
|
|
|
};
|
|
|
|
|
2022-10-06 18:32:54 +00:00
|
|
|
postPatch = ''
|
|
|
|
sed -i 's/^protobuf.*/protobuf/' requirements.txt
|
|
|
|
'';
|
|
|
|
|
2022-03-10 19:12:11 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
coqpit
|
|
|
|
fsspec
|
2022-09-09 14:08:57 +00:00
|
|
|
torch-bin
|
2022-03-10 19:12:11 +00:00
|
|
|
soundfile
|
2022-07-14 12:49:19 +00:00
|
|
|
tensorboardx
|
|
|
|
protobuf
|
2022-03-10 19:12:11 +00:00
|
|
|
];
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
# only one test and that requires training data from the internet
|
2022-03-10 19:12:11 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
2022-03-30 09:31:56 +00:00
|
|
|
torchvision-bin
|
2022-03-10 19:12:11 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|