git.iko.soy/typeable/nixpkgs
on master help sign in
tts: Switch from tensorboardx to torch.util.tensorboard
commit163450e36249804cb57fced6e95d09bb86e84ca9 authorJunji Hashimoto <junji.hashimoto@gmail.com> dateWed 23 Mar 2022, 11:56 (5 years ago) parent5be1669
2 files changed+16−7
pkgs/development/python-modules/coqui-trainer/default.nix+15−6 pkgs/tools/audio/tts/default.nix+1−1
pkgs/development/python-modules/coqui-trainer/default.nix+15−6
@@ -1,15 +1,16 @@
11{ lib
22, buildPythonPackage
3+, fetchpatch
34, fetchFromGitHub
5+, pythonAtLeast
46
57, coqpit
68, fsspec
7−, pytorch
9+, pytorch-bin
810
911, pytestCheckHook
1012, soundfile
11−, tensorboardx
12−, torchvision
13+, torchvision-bin
1314}:
1415
1516let
@@ -20,6 +21,8 @@ buildPythonPackage {
2021 inherit pname version;
2122 format = "pyproject";
2223
24+ disabled = pythonAtLeast "3.10"; # https://github.com/coqui-ai/Trainer/issues/22
25+
2326 src = fetchFromGitHub {
2427 owner = "coqui-ai";
2528 repo = "Trainer";
@@ -27,12 +30,18 @@ buildPythonPackage {
2730 hash = "sha256-NsgCh+N2qWmRkTOjXqisVCP5aInH2zcNz6lsnIfVLiY=";
2831 };
2932
33+ patches = [
34+ (fetchpatch {
35+ url = "https://github.com/coqui-ai/Trainer/commit/07b447abf3290c8f2e5e723687b8a480b7382265.patch";
36+ sha256 = "0v1hl784d9rghkblcfwgzp0gg9d6r5r0yv2kapzdz2qymiajy7y2";
37+ })
38+ ];
39+
3040 propagatedBuildInputs = [
3141 coqpit
3242 fsspec
33− pytorch
43+ pytorch-bin
3444 soundfile
35− tensorboardx
3645 ];
3746
3847 # only one test and that requires training data from the internet
@@ -40,7 +49,7 @@ buildPythonPackage {
4049
4150 checkInputs = [
4251 pytestCheckHook
43− torchvision
52+ torchvision-bin
4453 ];
4554
4655 pythonImportsCheck = [
pkgs/tools/audio/tts/default.nix+1−1
@@ -57,6 +57,7 @@ python.pkgs.buildPythonApplication rec {
5757 ''-e 's/${package}.*[<>=]+.*/${package}/g' \''
5858 ) relaxedConstraints)}
5959 requirements.txt
60+ sed -i '/tensorboardX/d' requirements.txt
6061 '';
6162
6263 nativeBuildInputs = with python.pkgs; [
@@ -84,7 +85,6 @@ python.pkgs.buildPythonApplication rec {
8485 pyworld
8586 scipy
8687 soundfile
87− tensorboardx
8888 tensorflow
8989 torchaudio-bin
9090 tqdm