Libraries-and-Extensions-for-TensorFlow-for-Apple-Silicon
Libraries-and-Extensions-for-TensorFlow-for-Apple-Silicon copied to clipboard
tensorflow-text loading error
Hello @sun1638650145 ! thank you for you great guide how to build lib on M1 Apple machines!
Following your instructions I was able to build the lib but when I try to load it in my notebook it fails with error
dlopen(/Users/xxxxxxx/conda/tf/lib/python3.9/site-packages/tensorflow_text/python/ops/_regex_split_ops.dylib, 0x0006): re-export ordinal -2 in /Users/xxxxxxx/conda/tf/lib/python3.9/site-packages/tensorflow_text/python/ops/_regex_split_ops.dylib out of range for __ZN10tensorflow14kernel_factory17OpKernelRegistrar12InitInternalEPKNS_9KernelDefENSt3__117basic_string_viewIcNS5_11char_traitsIcEEEENS5_10unique_ptrINS0_15OpKernelFactoryENS5_14default_deleteISB_EEEEsymbol not found in flat namespace '__ZN10tensorflow14kernel_factory17OpKernelRegistrar12InitInternalEPKNS_9KernelDefENSt3__117basic_string_viewIcNS5_11char_traitsIcEEEENS5_10unique_ptrINS0_15OpKernelFactoryENS5_14default_deleteISB_EEEE'
python --version Python 3.9.13
conda list | grep tensorflow tensorflow-addons 0.17.1 pypi_0 pypi tensorflow-deps 2.9.0 0 apple tensorflow-estimator 2.9.0 pypi_0 pypi tensorflow-hub 0.12.0 pypi_0 pypi tensorflow-macos 2.9.0 pypi_0 pypi tensorflow-metal 0.5.0 pypi_0 pypi tensorflow-text 2.9.0 pypi_0 pypi
nm /Users/xxxxxxx/conda/tf/lib/python3.9/site-packages/tensorflow_text/python/ops/_regex_split_ops.dylib | grep "__ZN10tensorflow14kernel_factory17OpKernelRegistrar12InitInternalEPKNS_9KernelDefENSt3__117basic_string_viewIcNS5_11char_traitsIcEEEENS5_10unique_ptrINS0_15OpKernelFactoryENS5_14default_deleteISB_EEEE" U __ZN10tensorflow14kernel_factory17OpKernelRegistrar12InitInternalEPKNS_9KernelDefENSt3__117basic_string_viewIcNS5_11char_traitsIcEEEENS5_10unique_ptrINS0_15OpKernelFactoryENS5_14default_deleteISB_EEEE I __ZN10tensorflow14kernel_factory17OpKernelRegistrar12InitInternalEPKNS_9KernelDefENSt3__117basic_string_viewIcNS5_11char_traitsIcEEEENS5_10unique_ptrINS0_15OpKernelFactoryENS5_14default_deleteISB_EEEE (indirect for __ZN10tensorflow14kernel_factory17OpKernelRegistrar12InitInternalEPKNS_9KernelDefENSt3__117basic_string_viewIcNS5_11char_traitsIcEEEENS5_10unique_ptrINS0_15OpKernelFactoryENS5_14default_deleteISB_EEEE)
Any help would be much appreciated
Hello, I did find this bug. But now seeing that this issue is widely appearing on tensorflow_text 2.9, the issues of tensorflow_text have submitted multiple similar issues. The cause of this problem does not appear to be a problem with the build step.
Now there are about 3 methods you can try:
- You can directly download my pre-compiled
whlfile. - Update
tensorflow_macosto2.9.2and recompile. - Change to a version of Python, currently
Python 3.8is the most stable.
Hope these methods are of some help to you.