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
Esteemed Contributor
Esteemed Contributor

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
Esteemed Contributor
Esteemed Contributor

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
Esteemed Contributor
Esteemed Contributor

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

Join 100K+ Data Experts: Register Now & Grow with Us!

Excited to expand your horizons with us? Click here to Register and begin your journey to success!

Already a member? Login and join your local regional user group! If there isn’t one near you, fill out this form and we’ll create one for you to join!