From f32e876f36da2c6626a456ad16a2ade5fa762358 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sun, 9 Jan 2022 16:24:47 +0100 Subject: [PATCH 1/2] python3.pkgs.tensorboardx: re-enable disabled test The mentioned warning does not fail the test in question. --- pkgs/development/python-modules/tensorboardx/default.nix | 3 --- 1 file changed, 3 deletions(-) diff --git a/pkgs/development/python-modules/tensorboardx/default.nix b/pkgs/development/python-modules/tensorboardx/default.nix index 2127d2275678..603d2a1cc2b2 100644 --- a/pkgs/development/python-modules/tensorboardx/default.nix +++ b/pkgs/development/python-modules/tensorboardx/default.nix @@ -63,9 +63,6 @@ buildPythonPackage rec { disabledTestPaths = [ # we are not interested in linting errors "tests/test_lint.py" - # breaks with `RuntimeError: cannot schedule new futures after interpreter shutdown` - # Upstream tracking bug: https://github.com/lanpa/tensorboardX/issues/652 - "tests/test_pr_curve.py" ]; meta = with lib; { From 19be0891069a116ea6eff5d3a1aa87ad2a1b39bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Wed, 22 Dec 2021 12:00:11 +0100 Subject: [PATCH 2/2] tensorboardx: fix tests --- .../python-modules/tensorboardx/default.nix | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/tensorboardx/default.nix b/pkgs/development/python-modules/tensorboardx/default.nix index 603d2a1cc2b2..eacb5b4cdc80 100644 --- a/pkgs/development/python-modules/tensorboardx/default.nix +++ b/pkgs/development/python-modules/tensorboardx/default.nix @@ -1,13 +1,14 @@ { boto3 , buildPythonPackage , crc32c +, which , fetchFromGitHub , lib , matplotlib , moto , numpy , pillow -, protobuf +, protobuf3_8 , pytestCheckHook , pytorch , six @@ -24,7 +25,7 @@ buildPythonPackage rec { owner = "lanpa"; repo = "tensorboardX"; rev = "v${version}"; - sha256 = "1kcw062bcqvqva5kag9j7q72wk3vdqgf5cnn0lxmsvhlmq5sjdfn"; + sha256 = "sha256-1jWpC64Ubl07Bday4h5ue0wuDj4yPTWL2nhjtoQBnM0="; }; # apparently torch API changed a bit at 1.6 @@ -34,10 +35,16 @@ buildPythonPackage rec { "torch.onnx.select_model_mode_for_export(model, torch.onnx.TrainingMode.EVAL)" ''; + # Wanted protobuf version is mentioned here: + # https://github.com/lanpa/tensorboardX/blob/0d08112618a2bbda4c028a15a137fed3afe77401/compile.sh#L6 + nativeBuildInputs = [ which protobuf3_8 ]; + + # required to make tests deterministic + PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION = "python"; + propagatedBuildInputs = [ crc32c numpy - protobuf six soundfile ];