Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop setting PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION env var #1887

Merged
merged 1 commit into from
Feb 25, 2019

Conversation

nfelt
Copy link
Contributor

@nfelt nfelt commented Feb 25, 2019

This should fix #1566 by reverting #1489, which was unfortunately a misguided change on my part. I thought that the env var was necessary in order to opt in to the C++ implementation because not all protobuf python distributions have the C++ implementation activated by default even if they include the appropriate extension. Apparently this either was never true, or certainly hasn't been true since protobuf 3.5.1 (and we're already on 3.6.0). And setting the env var is actively harmful when protobuf doesn't include the C++ extension because then it fails with the error in #1566. (Protobuf should really provide a safe way to opt into the C++ implementation only if it is present, but they currently don't.)

I think I thought this was necessary because apparently when you bazel build tensorboard the resulting binary uses the bazel-provided protobuf-python and that does seem to include the C++ extension but still default to the python implementation (which is why this env var made a difference in my limited initial testing; I just didn't realize I needed to test it against the pip package version).

We should figure out a way to make the locally built tensorboard fast that doesn't require setting this env vars unconditionally, but I'm fixing this first to unbreak users in #1566.

Tested by building pip package and confirming that the selected protobuf implementation is still CPP and that when profiling event loading, it shows the C++ extension signatures in the output.

@nfelt
Copy link
Contributor Author

nfelt commented Feb 25, 2019

Filed #1888 for making bazel build tensorboard use the fast C++ protobuf impl, without having to set these env vars.

@nfelt nfelt merged commit 5c384ac into tensorflow:master Feb 25, 2019
@nfelt nfelt deleted the protobuf-no-more-env-vars branch February 25, 2019 17:10
nfelt added a commit to nfelt/tensorboard that referenced this pull request Feb 25, 2019
@nfelt nfelt mentioned this pull request Feb 25, 2019
SA-PCR-RO pushed a commit to AnacondaRecipes/tensorflow_recipes that referenced this pull request Mar 15, 2019
- tensorboard: drop protobuf patch.
  xref: tensorflow/tensorboard#1887
- update path for toco in workaround for linking problem on windows
  xref: tensorflow/tensorflow@61c6c84
- bazel doesn't play well with PATH in recent versions. Set
  CONDA_DLL_SEARCH_MODIFICATION_ENABLE=1 during tests
- force bazel in host env on Windows since it has to be in the same env
  as the one in which all m2-* deps are installed
- also build with cudatoolkit 10, cudnn 7.3
- add python 3.7 builds to the matrix for meta packages
jjhelmus pushed a commit to AnacondaRecipes/tensorflow_recipes that referenced this pull request Apr 5, 2019
- tensorboard: drop protobuf patch.
  xref: tensorflow/tensorboard#1887
- update path for toco in workaround for linking problem on windows
  xref: tensorflow/tensorflow@61c6c84
- bazel doesn't play well with PATH in recent versions. Set
  CONDA_DLL_SEARCH_MODIFICATION_ENABLE=1 during tests
- force bazel in host env on Windows since it has to be in the same env
  as the one in which all m2-* deps are installed
- also build with cudatoolkit 10, cudnn 7.3
- add python 3.7 builds to the matrix for meta packages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants