Merge pull request #194083 from Mic92/tensorboardx

python3.pkgs.tensorboardx: fix build
This commit is contained in:
Benjamin Hipple 2022-10-02 12:20:24 -04:00 committed by GitHub
commit e5f9412eca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -33,6 +33,10 @@ buildPythonPackage rec {
substituteInPlace tensorboardX/pytorch_graph.py --replace \ substituteInPlace tensorboardX/pytorch_graph.py --replace \
"torch.onnx.set_training(model, False)" \ "torch.onnx.set_training(model, False)" \
"torch.onnx.select_model_mode_for_export(model, torch.onnx.TrainingMode.EVAL)" "torch.onnx.select_model_mode_for_export(model, torch.onnx.TrainingMode.EVAL)"
# Version detection seems broken here, the version reported by python is
# newer than the protobuf package itself.
sed -i -e "s/'protobuf[^']*'/'protobuf'/" setup.py
''; '';
# Wanted protobuf version is mentioned here: # Wanted protobuf version is mentioned here: