Hi , i am working on a project related to bert, where I will be using many modules like numpy,pandas,scipy,matplotlib in a Tensorflow environment now there is some versions in compatibility for numpy to run on the Tf environment like this can someone help me in fixing it ?
(tf-gpu) [root@localhost BERT]# python3 bert.py
2024-03-08 14:21:35.255144: I tensorflow/core/util/port.cc:111] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable TF_ENABLE_ONEDNN_OPTS=0
.
2024-03-08 14:21:35.293347: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 AVX512F AVX512_VNNI AVX512_BF16 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
RuntimeError: module compiled against API version 0x10 but this version of numpy is 0xe
ImportError: numpy.core._multiarray_umath failed to import
ImportError: numpy.core.umath failed to import
Traceback (most recent call last):
File “/home/BERT/bert.py”, line 2, in
import tensorflow as tf
File “/root/miniconda3/envs/tf-gpu/lib/python3.9/site-packages/tensorflow/init.py”, line 38, in
from tensorflow.python.tools import module_util as _module_util
File “/root/miniconda3/envs/tf-gpu/lib/python3.9/site-packages/tensorflow/python/init.py”, line 42, in
from tensorflow.python.saved_model import saved_model
File “/root/miniconda3/envs/tf-gpu/lib/python3.9/site-packages/tensorflow/python/saved_model/saved_model.py”, line 20, in
from tensorflow.python.saved_model import builder
File “/root/miniconda3/envs/tf-gpu/lib/python3.9/site-packages/tensorflow/python/saved_model/builder.py”, line 23, in
from tensorflow.python.saved_model.builder_impl import _SavedModelBuilder
File “/root/miniconda3/envs/tf-gpu/lib/python3.9/site-packages/tensorflow/python/saved_model/builder_impl.py”, line 26, in
from tensorflow.python.framework import dtypes
File “/root/miniconda3/envs/tf-gpu/lib/python3.9/site-packages/tensorflow/python/framework/dtypes.py”, line 37, in
_np_bfloat16 = pywrap_ml_dtypes.bfloat16()
TypeError: Unable to convert function return value to a Python type! The signature was
() → handle
(tf-gpu) [root@localhost BERT]#
Welcome to the TensorFlow Forum!
Please verify by checking this TF tested build configuration if you have installed all the correct version of required libraries (TensorFlow, Python, CUDA and cuDNN) as per your system OS to have GPU support enabled in your system.
Please let us know if the issue still persists. Thank you.