Code Monkey home page Code Monkey logo

multidim-image-augmentation's People

Contributors

derpson avatar health-research-copybot avatar joth76 avatar tkoeppe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

multidim-image-augmentation's Issues

Build fails on XCode

(Split out from #2 )
#2 (comment)

See error below. This looks like a core Tensorflow (python/eager) issue rather than an issue with the augmentation ops, but opening this issue to record it and track the dependency.

I tried building it with Python 2.7 and TensorFlow 1.12.0 and Apple LLVM version 10.0.0 (clang-1000.11.45.5) on macOS. This is the error that I get:

external/org_tensorflow/tensorflow/stream_executor/stream.cc:2000:20: note: found near match 'mu_'
1 warning generated.
ERROR: /private/var/tmp/_bazel_erfannoury/97ea2cf401b618555fb89753b5af4c62/external/org_tensorflow/tensorflow/python/eager/BUILD:10:1: C++ compilation of rule '@org_tensorflow//tensorflow/python/eager:pywrap_tfe_lib' failed (Exit 1)
In file included from external/org_tensorflow/tensorflow/python/eager/pywrap_tfe_src.cc:18:
In file included from external/org_tensorflow/tensorflow/python/eager/pywrap_tfe.h:22:
In file included from external/org_tensorflow/tensorflow/core/lib/core/status.h:23:
In file included from bazel-out/darwin-opt/genfiles/external/org_tensorflow/tensorflow/core/lib/core/error_codes.pb.h:9:
In file included from external/protobuf_archive/src/google/protobuf/stubs/common.h:39:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iostream:38:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ios:216:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__locale:518:15: error: C++ requires a type specifier for all declarations
    char_type toupper(char_type __c) const
              ^
bazel-out/darwin-opt/genfiles/external/local_config_python/python_include/pyport.h:731:29: note: expanded from macro 'toupper'
#define toupper(c) towupper(btowc(c))
                            ^
In file included from external/org_tensorflow/tensorflow/python/eager/pywrap_tfe_src.cc:18:
In file included from external/org_tensorflow/tensorflow/python/eager/pywrap_tfe.h:22:
In file included from external/org_tensorflow/tensorflow/core/lib/core/status.h:23:
In file included from bazel-out/darwin-opt/genfiles/external/org_tensorflow/tensorflow/core/lib/core/error_codes.pb.h:9:
In file included from external/protobuf_archive/src/google/protobuf/stubs/common.h:39:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iostream:38:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ios:216:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__locale:524:48: error: too many arguments provided to function-like macro invocation
    const char_type* toupper(char_type* __low, const char_type* __high) const
                                               ^

Create an interactive tutorial / example notebooks on how to use ops

The OSS documentation is currently very thin, it would be useful to add:

  • an example project that uses the augmentation within a training loop (e.g. with randomization of deformation field, etc)
  • an interactive demo based on the internal ipynb for experimenting and visualizing the deform and color augmentation ops

Support py3

Split out from issue #2

Currently only py2.7 is supported, this issue tracks adding py3 support.

see "undefined symbol: PyCObject_Type" below

ERROR: /home/erfannoury/.cache/bazel/_bazel_erfannoury/2f5f4c4cfb6ca03d34e4841831474c3a/external/org_tensorflow/ten
sorflow/BUILD:592:1: Executing genrule @org_tensorflow//tensorflow:tensorflow_python_api_gen failed (Exit 1)
Traceback (most recent call last):
  File "/home/erfannoury/.cache/bazel/_bazel_erfannoury/2f5f4c4cfb6ca03d34e4841831474c3a/execroot/multidim_image_au
gmentation/bazel-out/host/bin/external/org_tensorflow/tensorflow/create_tensorflow.python_api.runfiles/org_tensorfl
ow/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "/home/erfannoury/.cache/bazel/_bazel_erfannoury/2f5f4c4cfb6ca03d34e4841831474c3a/execroot/multidim_image_au
gmentation/bazel-out/host/bin/external/org_tensorflow/tensorflow/create_tensorflow.python_api.runfiles/org_tensorfl
ow/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "/home/erfannoury/.cache/bazel/_bazel_erfannoury/2f5f4c4cfb6ca03d34e4841831474c3a/execroot/multidim_image_augmentation/bazel-out/host/bin/external/org_tensorflow/tensorflow/create_tensorflow.python_api.runfiles/org_tensorflow/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
  File "/home/erfannoury/anaconda3/lib/python3.6/imp.py", line 243, in load_module
    return load_dynamic(name, filename, file)
  File "/home/erfannoury/anaconda3/lib/python3.6/imp.py", line 343, in load_dynamic
    return _load(spec)
ImportError: /home/erfannoury/.cache/bazel/_bazel_erfannoury/2f5f4c4cfb6ca03d34e4841831474c3a/execroot/multidim_image_augmentation/bazel-out/host/bin/external/org_tensorflow/tensorflow/create_tensorflow.python_api.runfiles/org_tensorflow/tensorflow/python/_pywrap_tensorflow_internal.so: undefined symbol: PyCObject_Type

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/erfannoury/.cache/bazel/_bazel_erfannoury/2f5f4c4cfb6ca03d34e4841831474c3a/execroot/multidim_image_augmentation/bazel-out/host/bin/external/org_tensorflow/tensorflow/create_tensorflow.python_api.runfiles/org_tensorflow/tensorflow/python/tools/api/generator/create_python_api.py", line 27, in <module>
    from tensorflow.python.tools.api.generator import doc_srcs
  File "/home/erfannoury/.cache/bazel/_bazel_erfannoury/2f5f4c4cfb6ca03d34e4841831474c3a/execroot/multidim_image_augmentation/bazel-out/host/bin/external/org_tensorflow/tensorflow/create_tensorflow.python_api.runfiles/org_tensorflow/tensorflow/python/__init__.py", line 49, in <module>
    from tensorflow.python import pywrap_tensorflow
  File "/home/erfannoury/.cache/bazel/_bazel_erfannoury/2f5f4c4cfb6ca03d34e4841831474c3a/execroot/multidim_image_augmentation/bazel-out/host/bin/external/org_tensorflow/tensorflow/create_tensorflow.python_api.runfiles/org_tensorflow/tensorflow/python/pywrap_tensorflow.py", line 74, in <module>
    raise ImportError(msg)
ImportError: Traceback (most recent call last):
  File "/home/erfannoury/.cache/bazel/_bazel_erfannoury/2f5f4c4cfb6ca03d34e4841831474c3a/execroot/multidim_image_augmentation/bazel-out/host/bin/external/org_tensorflow/tensorflow/create_tensorflow.python_api.runfiles/org_tensorflow/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "/home/erfannoury/.cache/bazel/_bazel_erfannoury/2f5f4c4cfb6ca03d34e4841831474c3a/execroot/multidim_image_augmentation/bazel-out/host/bin/external/org_tensorflow/tensorflow/create_tensorflow.python_api.runfiles/org_tensorflow/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "/home/erfannoury/.cache/bazel/_bazel_erfannoury/2f5f4c4cfb6ca03d34e4841831474c3a/execroot/multidim_image_augmentation/bazel-out/host/bin/external/org_tensorflow/tensorflow/create_tensorflow.python_api.runfiles/org_tensorflow/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
  File "/home/erfannoury/anaconda3/lib/python3.6/imp.py", line 243, in load_module
    return load_dynamic(name, filename, file)
  File "/home/erfannoury/anaconda3/lib/python3.6/imp.py", line 343, in load_dynamic
    return _load(spec)
ImportError: /home/erfannoury/.cache/bazel/_bazel_erfannoury/2f5f4c4cfb6ca03d34e4841831474c3a/execroot/multidim_image_augmentation/bazel-out/host/bin/external/org_tensorflow/tensorflow/create_tensorflow.python_api.runfiles/org_tensorflow/tensorflow/python/_pywrap_tensorflow_internal.so: undefined symbol: PyCObject_Type

Build fails

When I try to build it using the default configuration file provided, the build fails with the following output:

ERROR: /home/erfannoury/.cache/bazel/_bazel_erfannoury/2f5f4c4cfb6ca03d34e4841831474c3a/external/org_tensorflow/ten
sorflow/BUILD:592:1: Executing genrule @org_tensorflow//tensorflow:tensorflow_python_api_gen failed (Exit 1)
Traceback (most recent call last):
  File "/home/erfannoury/.cache/bazel/_bazel_erfannoury/2f5f4c4cfb6ca03d34e4841831474c3a/execroot/multidim_image_au
gmentation/bazel-out/host/bin/external/org_tensorflow/tensorflow/create_tensorflow.python_api.runfiles/org_tensorfl
ow/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "/home/erfannoury/.cache/bazel/_bazel_erfannoury/2f5f4c4cfb6ca03d34e4841831474c3a/execroot/multidim_image_au
gmentation/bazel-out/host/bin/external/org_tensorflow/tensorflow/create_tensorflow.python_api.runfiles/org_tensorfl
ow/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "/home/erfannoury/.cache/bazel/_bazel_erfannoury/2f5f4c4cfb6ca03d34e4841831474c3a/execroot/multidim_image_augmentation/bazel-out/host/bin/external/org_tensorflow/tensorflow/create_tensorflow.python_api.runfiles/org_tensorflow/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
  File "/home/erfannoury/anaconda3/lib/python3.6/imp.py", line 243, in load_module
    return load_dynamic(name, filename, file)
  File "/home/erfannoury/anaconda3/lib/python3.6/imp.py", line 343, in load_dynamic
    return _load(spec)
ImportError: /home/erfannoury/.cache/bazel/_bazel_erfannoury/2f5f4c4cfb6ca03d34e4841831474c3a/execroot/multidim_image_augmentation/bazel-out/host/bin/external/org_tensorflow/tensorflow/create_tensorflow.python_api.runfiles/org_tensorflow/tensorflow/python/_pywrap_tensorflow_internal.so: undefined symbol: PyCObject_Type

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/erfannoury/.cache/bazel/_bazel_erfannoury/2f5f4c4cfb6ca03d34e4841831474c3a/execroot/multidim_image_augmentation/bazel-out/host/bin/external/org_tensorflow/tensorflow/create_tensorflow.python_api.runfiles/org_tensorflow/tensorflow/python/tools/api/generator/create_python_api.py", line 27, in <module>
    from tensorflow.python.tools.api.generator import doc_srcs
  File "/home/erfannoury/.cache/bazel/_bazel_erfannoury/2f5f4c4cfb6ca03d34e4841831474c3a/execroot/multidim_image_augmentation/bazel-out/host/bin/external/org_tensorflow/tensorflow/create_tensorflow.python_api.runfiles/org_tensorflow/tensorflow/python/__init__.py", line 49, in <module>
    from tensorflow.python import pywrap_tensorflow
  File "/home/erfannoury/.cache/bazel/_bazel_erfannoury/2f5f4c4cfb6ca03d34e4841831474c3a/execroot/multidim_image_augmentation/bazel-out/host/bin/external/org_tensorflow/tensorflow/create_tensorflow.python_api.runfiles/org_tensorflow/tensorflow/python/pywrap_tensorflow.py", line 74, in <module>
    raise ImportError(msg)
ImportError: Traceback (most recent call last):
  File "/home/erfannoury/.cache/bazel/_bazel_erfannoury/2f5f4c4cfb6ca03d34e4841831474c3a/execroot/multidim_image_augmentation/bazel-out/host/bin/external/org_tensorflow/tensorflow/create_tensorflow.python_api.runfiles/org_tensorflow/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "/home/erfannoury/.cache/bazel/_bazel_erfannoury/2f5f4c4cfb6ca03d34e4841831474c3a/execroot/multidim_image_augmentation/bazel-out/host/bin/external/org_tensorflow/tensorflow/create_tensorflow.python_api.runfiles/org_tensorflow/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "/home/erfannoury/.cache/bazel/_bazel_erfannoury/2f5f4c4cfb6ca03d34e4841831474c3a/execroot/multidim_image_augmentation/bazel-out/host/bin/external/org_tensorflow/tensorflow/create_tensorflow.python_api.runfiles/org_tensorflow/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
  File "/home/erfannoury/anaconda3/lib/python3.6/imp.py", line 243, in load_module
    return load_dynamic(name, filename, file)
  File "/home/erfannoury/anaconda3/lib/python3.6/imp.py", line 343, in load_dynamic
    return _load(spec)
ImportError: /home/erfannoury/.cache/bazel/_bazel_erfannoury/2f5f4c4cfb6ca03d34e4841831474c3a/execroot/multidim_image_augmentation/bazel-out/host/bin/external/org_tensorflow/tensorflow/create_tensorflow.python_api.runfiles/org_tensorflow/tensorflow/python/_pywrap_tensorflow_internal.so: undefined symbol: PyCObject_Type


Failed to load the native TensorFlow runtime.

See https://www.tensorflow.org/install/install_sources#common_installation_problems

for some common reasons and solutions.  Include the entire stack trace
above this error message when asking for help.
INFO: Elapsed time: 1827.095s, Critical Path: 148.66s
INFO: 6000 processes: 6000 local.
FAILED: Build did NOT complete successfully
//multidim_image_augmentation:apply_deformation_test                  NO STATUS
//multidim_image_augmentation:bspline_test                            NO STATUS
//multidim_image_augmentation:cubic_interpolation_test                NO STATUS
//multidim_image_augmentation:deformation_utils_test                  NO STATUS
//multidim_image_augmentation:python/kernel_tests/apply_deformation_op_test NO STATUS
//multidim_image_augmentation:python/kernel_tests/apply_tabulated_functions_op_test NO STATUS
//multidim_image_augmentation:python/kernel_tests/cubic_interpolation1d_op_test NO STATUS
//multidim_image_augmentation:python/kernel_tests/cubic_interpolation3d_op_test NO STATUS
//multidim_image_augmentation:python/kernel_tests/random_lut_controlpoints_op_test NO STATUS

FAILED: Build did NOT complete successfully

And when using the latest bazel rules and TensorFlow, build fails with the following output:

ERROR: /home/erfannoury/.cache/bazel/_bazel_erfannoury/3870f3bce73f7bcb8bc6521ddb648a26/external/org_tensorflow/ten
sorflow/BUILD:533:1: Executing genrule @org_tensorflow//tensorflow:tf_python_api_gen_v1 failed (Exit 1)
Traceback (most recent call last):
  File "/home/erfannoury/.cache/bazel/_bazel_erfannoury/3870f3bce73f7bcb8bc6521ddb648a26/execroot/multidim_image_au
gmentation/bazel-out/host/bin/external/org_tensorflow/tensorflow/create_tensorflow.python_api_1.runfiles/org_tensor
flow/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "/home/erfannoury/.cache/bazel/_bazel_erfannoury/3870f3bce73f7bcb8bc6521ddb648a26/execroot/multidim_image_au
gmentation/bazel-out/host/bin/external/org_tensorflow/tensorflow/create_tensorflow.python_api_1.runfiles/org_tensor
flow/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "/home/erfannoury/.cache/bazel/_bazel_erfannoury/3870f3bce73f7bcb8bc6521ddb648a26/execroot/multidim_image_augmentation/bazel-out/host/bin/external/org_tensorflow/tensorflow/create_tensorflow.python_api_1.runfiles/org_tensorflow/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
  File "/home/erfannoury/anaconda3/lib/python3.6/imp.py", line 243, in load_module
    return load_dynamic(name, filename, file)
  File "/home/erfannoury/anaconda3/lib/python3.6/imp.py", line 343, in load_dynamic
    return _load(spec)
ImportError: /home/erfannoury/.cache/bazel/_bazel_erfannoury/3870f3bce73f7bcb8bc6521ddb648a26/execroot/multidim_image_augmentation/bazel-out/host/bin/external/org_tensorflow/tensorflow/create_tensorflow.python_api_1.runfiles/org_tensorflow/tensorflow/python/_pywrap_tensorflow_internal.so: undefined symbol: PyCObject_Type

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/erfannoury/.cache/bazel/_bazel_erfannoury/3870f3bce73f7bcb8bc6521ddb648a26/execroot/multidim_image_augmentation/bazel-out/host/bin/external/org_tensorflow/tensorflow/create_tensorflow.python_api_1.runfiles/org_tensorflow/tensorflow/python/tools/api/generator/create_python_api.py", line 27, in <module>
    from tensorflow.python.tools.api.generator import doc_srcs
  File "/home/erfannoury/.cache/bazel/_bazel_erfannoury/3870f3bce73f7bcb8bc6521ddb648a26/execroot/multidim_image_augmentation/bazel-out/host/bin/external/org_tensorflow/tensorflow/create_tensorflow.python_api_1.runfiles/org_tensorflow/tensorflow/python/__init__.py", line 49, in <module>
    from tensorflow.python import pywrap_tensorflow
  File "/home/erfannoury/.cache/bazel/_bazel_erfannoury/3870f3bce73f7bcb8bc6521ddb648a26/execroot/multidim_image_augmentation/bazel-out/host/bin/external/org_tensorflow/tensorflow/create_tensorflow.python_api_1.runfiles/org_tensorflow/tensorflow/python/pywrap_tensorflow.py", line 74, in <module>
    raise ImportError(msg)
ImportError: Traceback (most recent call last):
  File "/home/erfannoury/.cache/bazel/_bazel_erfannoury/3870f3bce73f7bcb8bc6521ddb648a26/execroot/multidim_image_augmentation/bazel-out/host/bin/external/org_tensorflow/tensorflow/create_tensorflow.python_api_1.runfiles/org_tensorflow/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "/home/erfannoury/.cache/bazel/_bazel_erfannoury/3870f3bce73f7bcb8bc6521ddb648a26/execroot/multidim_image_augmentation/bazel-out/host/bin/external/org_tensorflow/tensorflow/create_tensorflow.python_api_1.runfiles/org_tensorflow/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "/home/erfannoury/.cache/bazel/_bazel_erfannoury/3870f3bce73f7bcb8bc6521ddb648a26/execroot/multidim_image_augmentation/bazel-out/host/bin/external/org_tensorflow/tensorflow/create_tensorflow.python_api_1.runfiles/org_tensorflow/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
  File "/home/erfannoury/anaconda3/lib/python3.6/imp.py", line 243, in load_module
    return load_dynamic(name, filename, file)
  File "/home/erfannoury/anaconda3/lib/python3.6/imp.py", line 343, in load_dynamic
    return _load(spec)
ImportError: /home/erfannoury/.cache/bazel/_bazel_erfannoury/3870f3bce73f7bcb8bc6521ddb648a26/execroot/multidim_image_augmentation/bazel-out/host/bin/external/org_tensorflow/tensorflow/create_tensorflow.python_api_1.runfiles/org_tensorflow/tensorflow/python/_pywrap_tensorflow_internal.so: undefined symbol: PyCObject_Type


Failed to load the native TensorFlow runtime.

See https://www.tensorflow.org/install/errors

for some common reasons and solutions.  Include the entire stack trace
above this error message when asking for help.
INFO: Elapsed time: 2011.728s, Critical Path: 152.53s
INFO: 7395 processes: 7395 local.
FAILED: Build did NOT complete successfully
//multidim_image_augmentation:apply_deformation_test                  NO STATUS
//multidim_image_augmentation:bspline_test                            NO STATUS
//multidim_image_augmentation:cubic_interpolation_test                NO STATUS
//multidim_image_augmentation:deformation_utils_test                  NO STATUS
//multidim_image_augmentation:python/kernel_tests/apply_deformation_op_test NO STATUS
//multidim_image_augmentation:python/kernel_tests/apply_tabulated_functions_op_test NO STATUS
//multidim_image_augmentation:python/kernel_tests/cubic_interpolation1d_op_test NO STATUS
//multidim_image_augmentation:python/kernel_tests/cubic_interpolation3d_op_test NO STATUS
//multidim_image_augmentation:python/kernel_tests/random_lut_controlpoints_op_test NO STATUS

FAILED: Build did NOT complete successfully

Any ideas on how can I build the project successfully?

Unable to find python/ops/_augmentation_ops.so after Bazel build

Hello,

I am having some trouble with the installation of the package I basically end up with the following error after a successful bazel build :

tensorflow.python.framework.errors_impl.NotFoundError: python/ops/_augmentation_ops.so: cannot open shared object file: No such file or directory

I am not familiar with Bazel but, from what I understand, the "bazel build/test" command is supposed to generate all the .so files. The test runs without any warning/error, the bazel related directories are all created (bazel-bin, bazel-out, bazel-genfiles,...) but are empty.

The commandline I used is

bazel test --cxxopt="-D_GLIBCXX_USE_CXX11_ABI=0" --config=nativeopt BUILD

I even tried without the --cxxopt="-D_GLIBCXX_USE_CXX11_ABI=0" and it does not work either.

Here is what I also did :

  • I tried several bazel versions ( 0.25, 0.22, 0.20).
  • I tried using a local tensorflow directory (including all the bins) and the distant default http archive.

Did I miss something on the installation procedure ?

Undefined symbol

I installed tf-nightly, and after my successful build, all tests were ok.
However, when I

from multidim_image_augmentation import augmentation_ops

----> 1 from multidim_image_augmentation import augmentation_ops
      2 from multidim_image_augmentation import deformation_utils

~/multidim-image-augmentation/multidim_image_augmentation/__init__.py in <module>
     18 # TODO: Store the returned object so application code can use it.
     19 tf.load_op_library(
---> 20     'multidim_image_augmentation/python/ops/_augmentation_ops.so')

~/anaconda3/envs/pytorch_1.x/lib/python3.7/site-packages/tensorflow/python/framework/load_library.py in load_op_library(library_filename)
     56     RuntimeError: when unable to load the library or get the python wrappers.
     57   """
---> 58   lib_handle = py_tf.TF_LoadLibrary(library_filename)
     59   try:
     60     wrappers = _pywrap_python_op_gen.GetPythonWrappers(

NotFoundError: multidim_image_augmentation/python/ops/_augmentation_ops.so: undefined symbol: _ZN10tensorflow15shape_inference14UnchangedShapeEPNS0_16InferenceContextE

The bazel build seems to be broken

Hello, currently I try to build the package with

mkdir -p /tmp/build_output_${USER}
docker run \
		  -e USER="$(id -u)" \
		  -u="$(id -u)" \
		  -v ${PWD}:/src/workspace \
		  -v /tmp/build_output_${USER}:/tmp/build_output \
		  -w /src/workspace \
		  l.gcr.io/google/bazel:latest \
		  --output_user_root=/tmp/build_output test --python_version=py3 --config=nativeopt //...

I get the following output:

Extracting Bazel installation...
Starting local Bazel server and connecting to it...
Loading: 
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
...

It goes on indefinitely, if I kill it I get the following:

^C
Bazel caught interrupt signal; shutting down.

INFO: Call stack for the definition of repository 'org_tensorflow' which is a http_archive (rule definition at /tmp/build_output/a08c2e4811c846650b733c6fc815a920/external/bazel_tools/tools/build_defs/repo/http.bzl:292:16):
 - /src/workspace/WORKSPACE:26:1
WARNING: Download from https://mirror.bazel.build/github.com/tensorflow/tensorflow/archive/v1.13.1.tar.gz failed: class com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpException GET returned 404 Not Found
ERROR: An error occurred during the fetch of repository 'org_tensorflow':
   java.io.IOException: thread interrupted
ERROR: build interrupted
INFO: Elapsed time: 21.933s
^CINFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)
ERROR: Couldn't start the build. Unable to run tests
FAILED: Build did NOT complete successfully (0 packages loaded)

The link described in the error message (https://mirror.bazel.build/github.com/tensorflow/tensorflow/archive/v1.13.1.tar.gz) is indeed dead.

What could be the cause ?

Build did not complete successfully

I get an issue when I try to build a package.

ERROR: /home/maksym/.cache/bazel/_bazel_root/27a245299219db825e5cac653b013711/external/org_tensorflow/tensorflow/BUILD:592:1: Executing genrule @org_tensorflow//tensorflow:tensorflow_python_api_gen failed (Exit 1)
Traceback (most recent call last):
  File "/home/maksym/.cache/bazel/_bazel_root/27a245299219db825e5cac653b013711/execroot/multidim_image_augmentation/bazel-out/host/bin/external/org_tensorflow/tensorflow/create_tensorflow.python_api.runfiles/org_tensorflow/tensorflow/python/tools/api/generator/create_python_api.py", line 27, in <module>
    from tensorflow.python.tools.api.generator import doc_srcs
  File "/home/maksym/.cache/bazel/_bazel_root/27a245299219db825e5cac653b013711/execroot/multidim_image_augmentation/bazel-out/host/bin/external/org_tensorflow/tensorflow/create_tensorflow.python_api.runfiles/org_tensorflow/tensorflow/python/__init__.py", line 52, in <module>
    from tensorflow.core.framework.graph_pb2 import *
  File "/home/maksym/.cache/bazel/_bazel_root/27a245299219db825e5cac653b013711/execroot/multidim_image_augmentation/bazel-out/host/bin/external/org_tensorflow/tensorflow/create_tensorflow.python_api.runfiles/org_tensorflow/tensorflow/core/framework/graph_pb2.py", line 15, in <module>
    from tensorflow.core.framework import node_def_pb2 as tensorflow_dot_core_dot_framework_dot_node__def__pb2
  File "/home/maksym/.cache/bazel/_bazel_root/27a245299219db825e5cac653b013711/execroot/multidim_image_augmentation/bazel-out/host/bin/external/org_tensorflow/tensorflow/create_tensorflow.python_api.runfiles/org_tensorflow/tensorflow/core/framework/node_def_pb2.py", line 15, in <module>
    from tensorflow.core.framework import attr_value_pb2 as tensorflow_dot_core_dot_framework_dot_attr__value__pb2
  File "/home/maksym/.cache/bazel/_bazel_root/27a245299219db825e5cac653b013711/execroot/multidim_image_augmentation/bazel-out/host/bin/external/org_tensorflow/tensorflow/create_tensorflow.python_api.runfiles/org_tensorflow/tensorflow/core/framework/attr_value_pb2.py", line 15, in <module>
    from tensorflow.core.framework import tensor_pb2 as tensorflow_dot_core_dot_framework_dot_tensor__pb2
  File "/home/maksym/.cache/bazel/_bazel_root/27a245299219db825e5cac653b013711/execroot/multidim_image_augmentation/bazel-out/host/bin/external/org_tensorflow/tensorflow/create_tensorflow.python_api.runfiles/org_tensorflow/tensorflow/core/framework/tensor_pb2.py", line 15, in <module>
    from tensorflow.core.framework import resource_handle_pb2 as tensorflow_dot_core_dot_framework_dot_resource__handle__pb2
  File "/home/maksym/.cache/bazel/_bazel_root/27a245299219db825e5cac653b013711/execroot/multidim_image_augmentation/bazel-out/host/bin/external/org_tensorflow/tensorflow/create_tensorflow.python_api.runfiles/org_tensorflow/tensorflow/core/framework/resource_handle_pb2.py", line 22, in <module>
    serialized_pb=_b('\n/tensorflow/core/framework/resource_handle.proto\x12\ntensorflow\"r\n\x13ResourceHandleProto\x12\x0e\n\x06\x64\x65vice\x18\x01 \x01(\t\x12\x11\n\tcontainer\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x11\n\thash_code\x18\x04 \x01(\x04\x12\x17\n\x0fmaybe_type_name\x18\x05 \x01(\tBn\n\x18org.tensorflow.frameworkB\x0eResourceHandleP\x01Z=github.com/tensorflow/tensorflow/tensorflow/go/core/framework\xf8\x01\x01\x62\x06proto3')
TypeError: __init__() got an unexpected keyword argument 'syntax'
INFO: Elapsed time: 18.120s, Critical Path: 15.18s
INFO: 114 processes: 114 local.
FAILED: Build did NOT complete successfully
//multidim_image_augmentation:apply_deformation_test                  NO STATUS
//multidim_image_augmentation:bspline_test                            NO STATUS
//multidim_image_augmentation:cubic_interpolation_test                NO STATUS
//multidim_image_augmentation:deformation_utils_test                  NO STATUS
//multidim_image_augmentation:python/kernel_tests/apply_deformation_op_test NO STATUS
//multidim_image_augmentation:python/kernel_tests/apply_tabulated_functions_op_test NO STATUS
//multidim_image_augmentation:python/kernel_tests/cubic_interpolation1d_op_test NO STATUS
//multidim_image_augmentation:python/kernel_tests/cubic_interpolation2d_op_test NO STATUS
//multidim_image_augmentation:python/kernel_tests/random_lut_controlpoints_op_test NO STATUS

FAILED: Build did NOT complete successfully

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.