1{ boto3 2, buildPythonPackage 3, crc32c 4, fetchFromGitHub 5, lib 6, matplotlib 7, moto 8, numpy 9, pillow 10, protobuf 11, pytestCheckHook 12, pytorch 13, six 14, soundfile 15, tensorflow-tensorboard 16, torchvision 17}: 18 19buildPythonPackage rec { 20 pname = "tensorboardx"; 21 version = "2.4"; 22 23 src = fetchFromGitHub { 24 owner = "lanpa"; 25 repo = "tensorboardX"; 26 rev = "v${version}"; 27 sha256 = "1kcw062bcqvqva5kag9j7q72wk3vdqgf5cnn0lxmsvhlmq5sjdfn"; 28 }; 29 30 # apparently torch API changed a bit at 1.6 31 postPatch = '' 32 substituteInPlace tensorboardX/pytorch_graph.py --replace \ 33 "torch.onnx.set_training(model, False)" \ 34 "torch.onnx.select_model_mode_for_export(model, torch.onnx.TrainingMode.EVAL)" 35 ''; 36 37 propagatedBuildInputs = [ 38 crc32c 39 numpy 40 protobuf 41 six 42 soundfile 43 ]; 44 45 checkInputs = [ 46 boto3 47 matplotlib 48 moto 49 pillow 50 pytestCheckHook 51 pytorch 52 tensorflow-tensorboard 53 torchvision 54 ]; 55 56 disabledTests = [ 57 # ImportError: Visdom visualization requires installation of Visdom 58 "test_TorchVis" 59 # Requires network access (FileNotFoundError: [Errno 2] No such file or directory: 'wget') 60 "test_onnx_graph" 61 ]; 62 63 disabledTestPaths = [ 64 # we are not interested in linting errors 65 "tests/test_lint.py" 66 ]; 67 68 meta = with lib; { 69 description = "Library for writing tensorboard-compatible logs"; 70 homepage = "https://github.com/lanpa/tensorboardX"; 71 license = licenses.mit; 72 maintainers = with maintainers; [ lebastr akamaus ]; 73 platforms = platforms.all; 74 }; 75}