python3Packages.tensorboardx: fix build after upgrade to PyTorch 1.6

This commit is contained in:
Dmitry Vyal 2020-09-05 23:46:04 +03:00 committed by Jonathan Ringer
parent af9b245c6e
commit 9b9cf9469f

View file

@ -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; {