about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/tensorboardx/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/tensorboardx/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/tensorboardx/default.nix6
1 files changed, 6 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/tensorboardx/default.nix b/nixpkgs/pkgs/development/python-modules/tensorboardx/default.nix
index d2532777d006..a95f8e029285 100644
--- a/nixpkgs/pkgs/development/python-modules/tensorboardx/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/tensorboardx/default.nix
@@ -19,6 +19,12 @@ buildPythonPackage rec {
 
   propagatedBuildInputs = [ numpy protobuf six ];
 
+  # apparently torch API changed a bit at 1.6
+  postPatch = ''
+    substituteInPlace tensorboardX/pytorch_graph.py --replace "torch.onnx.set_training(model, False)" "torch.onnx.select_model_mode_for_export(model, torch.onnx.TrainingMode.EVAL)"
+  '';
+
+
   disabledTests = [ "test_TorchVis"  "test_onnx_graph" ];
 
   meta = with lib; {