Is there any way to run Tensorflow unit tests manually? I want to perform sanity checks while modifying TF source code.
I see there are many _test.py files with classes that perform many test operations and I can't figure out how to run them. There should be an easy way?
Evaluation of a novel kit (TF-Test) for the diagnosis of intestinal parasitic infections.
The easiest way to run the TensorFlow unit tests is using Bazel, assuming you have downloaded the source from Git:
# All tests (for C++ changes). $ bazel test //tensorflow/... # All Python tests (for Python front-end changes). $ bazel test //tensorflow/python/... # All tests (with GPU support). $ bazel test -c opt --config=cuda //tensorflow/... $ bazel test -c opt --config=cuda //tensorflow/python/...
In addition to the above answer, you can run individual tests as shown instead of full packages, which can save a significant amount of time.
bazel run //tensorflow/python/kernel_tests:string_split_op_test bazel run //tensorflow/python:special_math_ops_test
Or you can go to the individual directory and run all the tests there
cd python/kernel_tests bazel run :one_hot_op_test
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With