I am new to Bazel and trying to use it to build a TF model, in particular tutorials/embedding [1]. I've cloned the whole "models" repo into a directory called "tensorflow_models" in the top level directory of the "tensorflow" repo itself. So the BUILD file for the embedding model [2] can "see" all the //tensorflow/... goodness.
Now, when I try building this whole model via:
bazel build --copt=-march=native -c opt --config=cuda //tensorflow_models/tutorials/embedding:package
I get:
ERROR: /home/fleitner/src/tensorflow/tensorflow_models/tutorials/embedding/BUILD:32:12: in deps attribute of py_binary rule //tensorflow_models/tutorials/embedding:word2vec: '//tensorflow_models/tutorials/embedding:word2vec_kernels' does not have mandatory provider 'py'.
ERROR: /home/fleitner/src/tensorflow/tensorflow_models/tutorials/embedding/BUILD:46:12: in deps attribute of py_binary rule //tensorflow_models/tutorials/embedding:word2vec_optimized: '//tensorflow_models/tutorials/embedding:word2vec_kernels' does not have mandatory provider 'py'.
ERROR: Analysis of target '//tensorflow_models/tutorials/embedding:package' failed; build aborted.
The problem for me is, I have no clue what this error is trying to tell me.
If I check the word2vec_kernels setup (in [2]), it all looks fine. Indeed, I can even build only the word2vec_kernels objective just fine. So why can't I build the word2vec and word2vec_optimized objectives? What is this "missing provider 'py'" stuff about?
Thanks for any help!
-Florian
[1] https://github.com/tensorflow/models/tree/master/tutorials/embedding
[2] https://raw.githubusercontent.com/tensorflow/models/master/tutorials/embedding/BUILD
--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/2054ed9c-df2e-464e-a8ed-dd6a2392fca9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I did (all inside my clone of the tensorflow repo):
./configure
bazel build --copt=-march=native -c opt --config=cuda //tensorflow/tools/pip_package:build_pip_package
bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg
sudo pip3 install /tmp/tensorflow_pkg/tensorflow-*.whl
With that, I can even bazel build the word2vec_kernel and gen_word2vec targets, as described in my first mail.
In fact, I can successfully work with a CUDA- and CPU-optimized tensorflow in python3.
And I can even run the word2vec.py and word2vec_optimized.py scripts from the command-line ("python3 word2vec.py ..."), as described in the README of the model.
But I don't grok why I can't run a "bazel build" the full model BUILD.
And I have no idea what the error "in deps attribute of py_binary rule ... does not have mandatory provider 'py'" is trying to tell me.
-Florian
--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/6b3af833-324d-472a-afe7-77ff93340555%40googlegroups.com.
Well, that sounds like quite the plausible explanation after reading up once more on py_binary [1]. I've filled a bug report, as you suggested [2]. Thank you very much for your quick assistance!
[1] https://www.bazel.io/versions/master/docs/be/python.html#py_binary