cancel
Showing results for 
Search instead for 
Did you mean: 
Machine Learning
cancel
Showing results for 
Search instead for 
Did you mean: 

Importing TensorFlow is giving an error when running ML model

shan_chandra
Honored Contributor III
Honored Contributor III

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
Honored Contributor III
Honored Contributor III

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
Honored Contributor III
Honored Contributor III

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

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.