summary refs log tree commit diff
path: root/pkgs/development/python-modules/coqui-trainer/default.nix
blob: 5ff53b8eb753fa21fb4d7699c5563ab22bb99578 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
{ lib
, buildPythonPackage
, fetchFromGitHub

, coqpit
, fsspec
, pytorch-bin

, pytestCheckHook
, soundfile
, tensorboardx
, torchvision
}:

let
  pname = "coqui-trainer";
  version = "0.0.4";
in
buildPythonPackage {
  inherit pname version;
  format = "pyproject";

  src = fetchFromGitHub {
    owner = "coqui-ai";
    repo = "Trainer";
    # https://github.com/coqui-ai/Trainer/issues/4
    rev = "776eba829231543d3207927fc69b321d121e527c";
    hash = "sha256-ICveftJjBNsCgegTmd/ewd/Y6XGMg7YOvchx640RFPI=";
  };

  propagatedBuildInputs = [
    coqpit
    fsspec
    pytorch-bin
    soundfile
    tensorboardx
  ];

  # tests are failing; tests require the clearml library
  # https://github.com/coqui-ai/Trainer/issues/5
  doCheck = false;

  checkInputs = [
    pytestCheckHook
    torchvision
  ];

  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;
  };
}