-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
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
[19.03] tensorflow-tensorboard requires tensorflow python module to be importable #61173
Comments
Additionally if I try to override the tensorflow-tensorboard derivation, I end up with really different results: {
pkgs ? import (fetchTarball https://github.com/NixOS/nixpkgs-channels/archive/cf3e277dd0bd710af0df667e9364f4bd80c72713.tar.gz) {},
pythonPath ? "python36"
}:
with pkgs;
let
python = lib.getAttrFromPath (lib.splitString "." pythonPath) pkgs;
in
{
old = python.pkgs.tensorflow-tensorboard;
new = python.pkgs.tensorflow-tensorboard.overridePythonAttrs (attrs: {
propagatedBuildInputs = [
python.pkgs.tensorflowWithoutCuda
] ++ attrs.propagatedBuildInputs;
});
} Building the
Building the
How can overriding the Using
|
It is possible to get
This looks like its a bug in the Logically it makes sense that But this ends up failing because when we try to use the I suggest that |
Edit: Tensorboard-2.0 requires wheel (with only protobuf>=3.6) and will run without tensorflow. This ticket is tagged with 19.03 -- will bumping tensorboard to 2.0 close this issue?
Identical output with python3. Please test in #71890 ~I'm currently investigating bumping tensorboard (which is backed-up by bumping protobuf and failing protobuf test suites for anything over 3.x, see #71889) and am not sure this is an issue for more recent versions of tensorboard. Of note, tensorboard has a I'm fairly invested in how this ticket will turn out. In truth, I'm trying to fix the test suite for pytorch-1.3.0 now that #65041 is merged. Pytorch-1.3.0 has added a tensorboard test suite which I believe requires tensorboard-2.0. Pulling in a transitive tensorflow dependency would be unfortunate overhead. |
Thank you for your contributions.
|
Issue description
In the latest 19.03, the new
tensorflow-tensorboard
Nix package exports an executable calledtensorboard
. To run this executable it needs to be able to importtensorflow
. Otherwise it comes up with an error:Now usually I solved this inside
nix-shell
where I just addtensorflowWithoutCuda
as apropagatedBuildInput
, and thentensorboard
works inside the nix-shell.However if I'm trying build a custom package that calls
tensorboard
viasubprocess.run
in Python, even if my own package hastensorboardWithoutCuda
in thepropagatedBuildInputs
, thetensorflow
Python module is not added to the PYTHONPATH for thetensorboard
executable. So when your own custom executable callstensorboard
, it results intensorboard
reporting that it cannot findtensorflow
module.Steps to reproduce
If you have a
setup.py
that registers this executable:The text was updated successfully, but these errors were encountered: