2022-03-07 20:43:23 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2022-03-23 02:56:47 +00:00
|
|
|
, fetchpatch
|
2022-03-07 20:43:23 +00:00
|
|
|
, fetchFromGitHub
|
2022-03-23 02:56:47 +00:00
|
|
|
, pythonAtLeast
|
2022-03-07 20:43:23 +00:00
|
|
|
|
|
|
|
, coqpit
|
|
|
|
, fsspec
|
2022-08-30 15:41:22 +00:00
|
|
|
, torch-bin
|
2022-06-27 21:20:50 +00:00
|
|
|
, tensorboardx
|
|
|
|
, protobuf
|
2023-01-22 08:29:18 +00:00
|
|
|
, psutil
|
2022-03-07 20:43:23 +00:00
|
|
|
|
|
|
|
, pytestCheckHook
|
|
|
|
, soundfile
|
2022-03-23 02:56:47 +00:00
|
|
|
, torchvision-bin
|
2022-03-07 20:43:23 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
2022-11-16 17:34:13 +00:00
|
|
|
pname = "trainer";
|
2023-03-17 15:35:44 +00:00
|
|
|
version = "0.0.24";
|
2022-03-07 20:43:23 +00:00
|
|
|
in
|
|
|
|
buildPythonPackage {
|
|
|
|
inherit pname version;
|
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "coqui-ai";
|
|
|
|
repo = "Trainer";
|
2022-07-16 10:59:02 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-03-17 15:35:44 +00:00
|
|
|
hash = "sha256-+Wr8kmHo3rWxknSN/jJVzXow95hNgth/j4OSj96gScE=";
|
2022-03-07 20:43:23 +00:00
|
|
|
};
|
|
|
|
|
2022-10-03 13:15:44 +00:00
|
|
|
postPatch = ''
|
|
|
|
sed -i 's/^protobuf.*/protobuf/' requirements.txt
|
|
|
|
'';
|
|
|
|
|
2022-03-07 20:43:23 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
coqpit
|
|
|
|
fsspec
|
2023-01-22 08:29:18 +00:00
|
|
|
protobuf
|
|
|
|
psutil
|
2022-03-07 20:43:23 +00:00
|
|
|
soundfile
|
2022-06-27 21:20:50 +00:00
|
|
|
tensorboardx
|
2023-01-22 08:29:18 +00:00
|
|
|
torch-bin
|
2022-03-07 20:43:23 +00:00
|
|
|
];
|
|
|
|
|
2022-03-16 17:00:31 +00:00
|
|
|
# only one test and that requires training data from the internet
|
2022-03-07 20:43:23 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeCheckInputs = [
|
2022-03-07 20:43:23 +00:00
|
|
|
pytestCheckHook
|
2022-03-23 02:56:47 +00:00
|
|
|
torchvision-bin
|
2022-03-07 20:43:23 +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-01-22 08:30:20 +00:00
|
|
|
changelog = "https://github.com/coqui-ai/Trainer/releases/tag/v${version}";
|
2022-03-07 20:43:23 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = teams.tts.members;
|
|
|
|
};
|
|
|
|
}
|