tensorflow / tensorflow/recommenders

Tutorial "Recommending movies: retrieval" is broken due to protobuf version conflict

Open
#673 0 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2k
Forks
300
PR merge metrics
No merged PRs in 30d

Description

The movie retrieval tutorial/notebook is broken due to a version conflict of the protobuf dependencies.

https://github.com/tensorflow/recommenders/blob/main/docs/examples/basic_retrieval.ipynb

Running the pip installs in the notebook (as well as in offline environments) yields the following error:

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. tensorflow-datasets 4.9.2 requires protobuf>=3.20, but you have protobuf 3.19.6 which is incompatible. tensorflow-metadata 1.13.1 requires protobuf<5,>=3.20.3, but you have protobuf 3.19.6 which is incompatible.

And subsequently:

ImportError: cannot import name 'builder' from 'google.protobuf.internal' (/usr/local/lib/python3.10/dist-packages/google/protobuf/internal/__init__.py)

Side note: installing scann in an offline environment will currently force tensorflow 2.11, which will conflicht with modules like tensorflow_datasets and tensorflow_recommenders.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open docs/examples/basic_retrieval.ipynb and run its pip install cells in a clean environment to reproduce the protobuf resolver warnings and ImportError. Compare the notebook's installed versions with the reported tensorflow-datasets, tensorflow-metadata, and ScaNN constraints. Done means the tutorial installs and runs without the reported protobuf conflict, including in the described offline setup.

Written by the indexing model from the issue text.

Assessment

Tech stack
jupyter-notebook, python, tensorflow
Domain
documentation, machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.