cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Machine Learning
Dive into the world of machine learning on the Databricks platform. Explore discussions on algorithms, model training, deployment, and more. Connect with ML enthusiasts and experts.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Importing TensorFlow is giving an error when running ML model

shan_chandra
Databricks Employee
Databricks Employee

Error stack trace:

TypeError: Descriptors cannot not be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:        
 1. Downgrade the protobuf package to 3.20.x or lower.
 2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).

More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates

 

1 ACCEPTED SOLUTION

Accepted Solutions

shan_chandra
Databricks Employee
Databricks Employee

Please find the below resolution:

Install a protobuf version >3.20 on the cluster. pinned the protobuf==3.20.1 on the Cluster libraries

Reference: https://github.com/tensorflow/tensorflow/issues/60320

View solution in original post

1 REPLY 1

shan_chandra
Databricks Employee
Databricks Employee

Please find the below resolution:

Install a protobuf version >3.20 on the cluster. pinned the protobuf==3.20.1 on the Cluster libraries

Reference: https://github.com/tensorflow/tensorflow/issues/60320

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group