1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4 5, coqpit 6, fsspec 7, torch 8, tensorboard 9, protobuf 10, psutil 11 12, pytestCheckHook 13, soundfile 14, torchvision 15}: 16 17let 18 pname = "trainer"; 19 version = "0.0.32"; 20in 21buildPythonPackage { 22 inherit pname version; 23 format = "pyproject"; 24 25 src = fetchFromGitHub { 26 owner = "coqui-ai"; 27 repo = "Trainer"; 28 rev = "refs/tags/v${version}"; 29 hash = "sha256-lSfkokPFB09KZBHe/Qkon2gUsA82AK52WNK1bJfzCNc="; 30 }; 31 32 postPatch = '' 33 sed -i 's/^protobuf.*/protobuf/' requirements.txt 34 ''; 35 36 propagatedBuildInputs = [ 37 coqpit 38 fsspec 39 protobuf 40 psutil 41 soundfile 42 tensorboard 43 torch 44 ]; 45 46 # only one test and that requires training data from the internet 47 doCheck = false; 48 49 nativeCheckInputs = [ 50 pytestCheckHook 51 torchvision 52 ]; 53 54 pythonImportsCheck = [ 55 "trainer" 56 ]; 57 58 meta = with lib; { 59 description = "A general purpose model trainer, as flexible as it gets"; 60 homepage = "https://github.com/coqui-ai/Trainer"; 61 changelog = "https://github.com/coqui-ai/Trainer/releases/tag/v${version}"; 62 license = licenses.asl20; 63 maintainers = teams.tts.members; 64 }; 65}