2022-03-07 21:43:23 +01:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2022-03-23 03:56:47 +01:00
|
|
|
, fetchpatch
|
2022-03-07 21:43:23 +01:00
|
|
|
, fetchFromGitHub
|
2022-03-23 03:56:47 +01:00
|
|
|
, pythonAtLeast
|
2022-03-07 21:43:23 +01:00
|
|
|
|
|
|
|
, coqpit
|
|
|
|
, fsspec
|
2022-08-30 17:41:22 +02:00
|
|
|
, torch-bin
|
2022-06-27 23:20:50 +02:00
|
|
|
, tensorboardx
|
|
|
|
, protobuf
|
2022-03-07 21:43:23 +01:00
|
|
|
|
|
|
|
, pytestCheckHook
|
|
|
|
, soundfile
|
2022-03-23 03:56:47 +01:00
|
|
|
, torchvision-bin
|
2022-03-07 21:43:23 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
pname = "coqui-trainer";
|
2022-09-13 14:48:06 +02:00
|
|
|
version = "0.0.15";
|
2022-03-07 21:43:23 +01:00
|
|
|
in
|
|
|
|
buildPythonPackage {
|
|
|
|
inherit pname version;
|
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "coqui-ai";
|
|
|
|
repo = "Trainer";
|
2022-07-16 12:59:02 +02:00
|
|
|
rev = "refs/tags/v${version}";
|
2022-09-13 14:48:06 +02:00
|
|
|
hash = "sha256-WBFsQuGnpqOiQW7VFfsk0t7qEBs1ScOChfQFpLmqTz4=";
|
2022-03-07 21:43:23 +01:00
|
|
|
};
|
|
|
|
|
2022-10-03 15:15:44 +02:00
|
|
|
postPatch = ''
|
|
|
|
sed -i 's/^protobuf.*/protobuf/' requirements.txt
|
|
|
|
'';
|
|
|
|
|
2022-03-07 21:43:23 +01:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
coqpit
|
|
|
|
fsspec
|
2022-08-30 17:41:22 +02:00
|
|
|
torch-bin
|
2022-03-07 21:43:23 +01:00
|
|
|
soundfile
|
2022-06-27 23:20:50 +02:00
|
|
|
tensorboardx
|
|
|
|
protobuf
|
2022-03-07 21:43:23 +01:00
|
|
|
];
|
|
|
|
|
2022-03-16 18:00:31 +01:00
|
|
|
# only one test and that requires training data from the internet
|
2022-03-07 21:43:23 +01:00
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
2022-03-23 03:56:47 +01:00
|
|
|
torchvision-bin
|
2022-03-07 21:43:23 +01: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;
|
|
|
|
};
|
|
|
|
}
|