2022-03-10 19:12:11 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
|
|
|
|
, coqpit
|
|
|
|
, fsspec
|
2022-09-09 14:08:57 +00:00
|
|
|
, torch-bin
|
2023-07-15 17:15:38 +00:00
|
|
|
, tensorboard
|
2022-07-14 12:49:19 +00:00
|
|
|
, protobuf
|
2023-02-02 18:25:31 +00:00
|
|
|
, psutil
|
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-07-15 17:15:38 +00:00
|
|
|
version = "0.0.27";
|
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-07-15 17:15:38 +00:00
|
|
|
hash = "sha256-2uITlcaGcRujhSZPK746d13X8ZrgaGbfMZruLmTpQIs=";
|
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
|
2023-02-02 18:25:31 +00:00
|
|
|
protobuf
|
|
|
|
psutil
|
2022-03-10 19:12:11 +00:00
|
|
|
soundfile
|
2023-07-15 17:15:38 +00:00
|
|
|
tensorboard
|
2023-02-02 18:25:31 +00:00
|
|
|
torch-bin
|
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;
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-03-10 19:12:11 +00:00
|
|
|
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";
|
2023-02-02 18:25:31 +00:00
|
|
|
changelog = "https://github.com/coqui-ai/Trainer/releases/tag/v${version}";
|
2022-03-10 19:12:11 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = teams.tts.members;
|
|
|
|
};
|
|
|
|
}
|