Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bad installation of tensorflow by pinning protobuf for RAI blbooksgenre notebook #3355

Closed
wants to merge 1 commit into from

Conversation

imatiach-msft
Copy link
Contributor

Description

Fix bad installation of tensorflow by pinning protobuf for RAI blbooksgenre notebook

Still seeing errors in blbooksgenre notebook like the following, but towards the end of the notebook:

TypeError: Descriptors cannot 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).

This seems to be due to a bad installation of tensorflow in the notebook environment - running the notebook in AzureML compute instance seems to work fine.

When looking at the python installation, it looks like originally "protobuf-3.19.6" is installed with tensorflow, but then the "google-api-core<3.0.0,>=1.0.0" package which is a dependency of azure-ai-ml upgrades protobuf to "protobuf-5.27.3", which is not compatible with tensorflow and generates the error message in one of the imports.
The temporary fix for now is to pin protobuf to a valid version.

Checklist

  • I have read the contribution guidelines.
  • I have coordinated with the docs team ([email protected]) if this PR deletes files or changes any file names or file extensions.
  • Pull request includes test coverage for the included changes.
  • This notebook or file is added to the CODEOWNERS file, pointing to the author or the author's team.

@imatiach-msft
Copy link
Contributor Author

imatiach-msft commented Aug 21, 2024

closing as this seems to cause the azure-ai-ml package to fail instead - instead I will send a fix in the ml-wrappers package for this issue: microsoft/ml-wrappers#176

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants