Closed ramkumarkoppu closed 1 year ago
Now an obvious mistake, you installed the whl
file compiled for Python 3.9
in the Python 3.10
environment.
Thank you for pointing out the mistake. Managed to dopip install ~/Downloads/tensorflow_text-2.12.0-cp310-cp310-macosx_11_0_arm64.whl
conda list | grep tensorflow tensorflow-addons 0.20.0 pypi_0 pypi tensorflow-datasets 4.9.2 pypi_0 pypi tensorflow-deps 2.9.0 0 apple tensorflow-estimator 2.12.0 pypi_0 pypi tensorflow-hub 0.13.0 pypi_0 pypi tensorflow-macos 2.12.0 pypi_0 pypi tensorflow-metadata 1.13.1 pypi_0 pypi tensorflow-metal 0.8.0 pypi_0 pypi tensorflow-text 2.12.0 pypi_0 pypi
but now have run time error by eras_nlp with this tensor flow-text package. Do you have recommendation on known working keras_nlp package for apple silicon?
Metal device set to: Apple M2 Max
systemMemory: 64.00 GB maxCacheSize: 24.00 GB
WARNING:tensorflow:The following Variables were used in a Lambda layer's call (tf.linalg.matmul), but are not present in its tracked objects: <tf.Variable 'token_embedding/embeddings:0' shape=(50257, 768) dtype=float32>. This is a strong indication that the Lambda layer should be rewritten as a subclassed Layer.
WARNING:absl:At this time, the v2.11+ optimizer tf.keras.optimizers.Adam
runs slowly on M1/M2 Macs, please use the legacy Keras optimizer instead, located at tf.keras.optimizers.legacy.Adam
.
WARNING:absl:There is a known slowdown when using v2.11+ Keras optimizers on M1/M2 Macs. Falling back to the legacy Keras optimizer, i.e., tf.keras.optimizers.legacy.Adam
.
2023-05-17 07:18:30.391709: W tensorflow/tsl/platform/profile_utils/cpu_utils.cc:128] Failed to get CPU frequency: 0 Hz
2023-05-17 07:18:32.098000: W tensorflow/core/framework/op_kernel.cc:1830] OP_REQUIRES failed at xla_compile_on_demand_op.cc:178 : NOT_FOUND: could not find registered platform with id: 0x12a7606a0
2023-05-17 07:18:32.099959: W tensorflow/core/framework/op_kernel.cc:1830] OP_REQUIRES failed at xla_compile_on_demand_op.cc:178 : NOT_FOUND: could not find registered platform with id: 0x12a7606a0
Traceback (most recent call last):
File "/Users/ramkumarkoppu/Downloads/GPT2.py", line 41, in
Detected at node 'transformer_layer_0/cached_multi_head_attention/XlaDynamicUpdateSlice' defined at (most recent call last):
File "/Users/ramkumarkoppu/Downloads/GPT2.py", line 41, in
First of all, it needs to be clarified that this repository is only for building whl
on Apple Silicon. However, I can still provide you with some troubleshooting ideas. You can uninstall tensorflow-metal
to determine if it's a GPU issue (as tensorflow-macos
can run independently). If it's a GPU problem, you should go to Apple's developer website and file an issue. If it's not a GPU problem, please file an issue on the keras-nlp
repository.
Thank you and appreciate your help:-)
downloaded latest version of package and tried to install it but it's not successful. it complains, pip install tensorflow_text-2.12.1-cp39-cp39-macosx_11_0_arm64.whl ERROR: tensorflow_text-2.12.1-cp39-cp39-macosx_11_0_arm64.whl is not a supported wheel on this platform.
Following is my current environment: conda list | grep -i tensorflow tensorflow-deps 2.9.0 0 apple tensorflow-estimator 2.12.0 pypi_0 pypi tensorflow-macos 2.12.0 pypi_0 pypi tensorflow-metal 0.8.0 pypi_0 pypi
python --version Python 3.10.11