Skip to content

Commit

Permalink
python3Packages.tensorboardx: fix build after upgrade to PyTorch 1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
akamaus authored and Jonathan Ringer committed Nov 11, 2020
1 parent af9b245 commit 9b9cf94
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkgs/development/python-modules/tensorboardx/default.nix
Expand Up @@ -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; {
Expand Down

0 comments on commit 9b9cf94

Please sign in to comment.