Bazel quits before building new op without error? - tensorflow

I was building a new Tensorflow op with external libraries yesterday and getting errors. Today when I ran the same code for some reason I ended up with this output instead:
(vent)user#server:/dir/tensorflow/tensorflow/core/user_ops$ bazel build --config opt //tensorflow/core/user_ops:my_op.cc
INFO: Found 1 target...
INFO: Elapsed time: 1.493s, Critical Path: 0.01s
(vent)user#server:/dir/tensorflow/tensorflow/core/user_ops$
I thought it was something wrong with my cache so I did a 'bazel clean' and then tried to rebuild the example op zero_out.so, but I got the same problem even though yesterday I was able to successfully run zero_out.so from //bazel-bin/tensorflow/core/user_ops. There's nothing wrong with bazel since I was able to start building tensorflow from source without it quitting on me. My build file in //tensorflow/core/user_ops looks like this:
load("//tensorflow:tensorflow.bzl", "tf_custom_op_library")
tf_custom_op_library(
name = "zero_out.so",
srcs = ["zero_out.cc"],
)
tf_custom_op_library(
name = "my_op.so",
srcs = ["my_op.cc"],
deps = ["#t//:libt"]
)
I've been looking around for a couple hours, but I can't find any help and I don't think I'm looking in the right places. Does this have something to do with the bazel clean deleting some important files? None of my BUILD or WORKSPACE files were changed and nothing on my server has changed.
I'm using Bazel v0.5.1 on Linux with TF v1.2.

Solution to the problem was simply because I had accidentally changed my_op.so to my_op.cc in the build command.

Related

react-native-config not working (Empty Config in both OS)

I'm really struggling with what seems like a very primitive error. I have installed react-native-config and when console.logging the Config object it returns {}.
The problem occurs both on android and iOS and it doesn't seem to be a linking issue because (even though RN 71.3 doesn't require manual linking) when following the steps to link manually on android I got an error saying RNCConfigPackage already linked.
This is a simplified version of my code:
import Config from 'react-native-config';
console.log(Config);
And this is what my .env file looks like:
REACT_APP_STAGE=development
TEST=ThisIsATest
ANOTHER_TEST=ThisIsAnotherTest
Debugging attempts
I have already tried:
Running gradlew clean and pod install (even though it's not a platform specific issue)
Run with ENVFILE=.env react-native run-android to hard code the env file
I understand that this is very limited information in order to debug the issue but any direction and help is appreciated including any approach you would follow to debug.
EDIT: The Config appeared in the end but is very late to update, an issue more people seem to be facing, I have used react-native-dotenv instead.

bazel build error when following tf tutorial 'usage with c++ api'

I have the following error messages
~/tensorflow$ bazel build tensorflow/examples/label_image/...
ERROR: /home/dooseop/tensorflow/tensorflow/tensorflow.bzl:497:19: name
'DATA_CFG' is not defined.
ERROR: error loading package '': Extension 'tensorflow/tensorflow.bzl'
has errors.
INFO: Elapsed time: 0.144s
when I try to follow the tutorial privided in https://www.tensorflow.org/tutorials/image_recognition
Some people (who receive the same error messages when build tensorflow with bazel) say 'upgrade bazel and try again'.
However, the advise doesn't work for me..Is there anyone who can tell me how to solve the problem?
Note that I installed 1) bazel 0.5.0 2)tensorflow 1.1.0 under ubuntu 16.04.
That is indeed strange, HOST_CFG was removed from Bazel 0.4.4, so a while ago. As far as I know Tensorflow already fixed its uses.
Maybe if you used older version of Bazel before, try running bazel clean --expunge just in case old Bazel left an inconsistent output tree. We did fix a bug there recently.
Or try latest Tensorflow 1.2rc0 or github HEAD.

Unable to build the TensorFlow model using bazel build

I have set up the TensorFlow server in a docker machine running on a windows machine by following the instructions from https://tensorflow.github.io/serving/serving_basic. I am successfully able to build and run the mnist_model. However, when I am trying to build the model for the wide_n_deep_tutorial example by running the following command "bazel build //tensorflow_serving/example:wide_n_deep_tutorial.py" the model is not successfully built as there are no files generated in bazel-bin folder.
Since there is no error message displayed while building the model, I am unable to figure out the problem. I would really appreciate if someone can help me debug and solve the problem.
You are just guessing the command line here as there is no target in the BUILD file of tensorflow serving for wide_n_deep_tutorial.py.
You can only build mnist and inception targets as of today.
By adding the target for wide and deep model in the BUILD file solves the problem.
Added the following to the BUILD file:
py_binary(
name = "wide_n_deep_model",
srcs = [
"wide_n_deep_model.py",
],
deps = [
"//tensorflow_serving/apis:predict_proto_py_pb2",
"//tensorflow_serving/apis:prediction_service_proto_py_pb2",
"#org_tensorflow//tensorflow:tensorflow_py",
],
)

casperjs.bat on windows fails with cannot find module cli.js error

I'm trying out casperJS to run some automated tests. On windows. I followed this installation guide but am stuck.
when I try to run a simple test from the command line like this:
casperjs.bat smoketest.js
I get the following error:
Error: Cannot find module 'C:/code/base/main/Shared/casperjs\modules\cli.js'
I checked, and the file cli.js does exist under the specified path.
I thought the problem could be the mixture of forward and backward slashes in the path, but I edited the bootstrap.js casper code to hard code the path and it made no difference - it still the cannot find module.
I'm have tried this using phantomJS version 1.9.0, and 1.8.2.
Anyone know what I am doing wrong?
Has anyone had success running casper on Windows?
This is due to a bug in PhantomJS 1.9.0 that does not allow for absolute path loading in Windows. Afaik, this should only be apparent if you are using a master build of CasperJS (v1.1).
This bug has been fixed, but is not yet in the Windows binary. You can compile it yourself if you'd like, but that can take quite a bit of time.
I was using the master build of casper. With the latest released version, 1.0.2, it works fine.

Not getting TBB to compile test examples

I am not getting TBB to work. I am following the steps in the "Getting started" document.
I am doing the following steps:
downloading the linux files + the sources files.
extracting them in 1 directory
calling make
going to tbb.../bin calling source tbbvars.sh intel64
going to examples/Getting_started/sub_string_finder
calling make
I then get the error:
sub_string_finder.cpp:32:30: fatal error: tbb/parallel_for.h: No such file or directory
I really googled a lot but can't find any related stuff.
I did also try to add some -I statement but it didnt help
I assume it is kind of a including/linking problem but I dont know how to fix.
This is all done on fedora 16 64bit. (kernel 3.1.4) // TBB version 4.0
The solution was to install tbb-devel package.