tfx icon indicating copy to clipboard operation
tfx copied to clipboard

TFX 1.15 docker image contains conflicting dependencies

Open IzakMaraisTAL opened this issue 1 year ago • 2 comments

System information

  • Have I specified the code to reproduce the issue: Yes
  • Environment in which the code is executed: Linux
  • TFX Version: 1.15.0 and 1.15.1
  • Python version: 3.10.14

Describe the current behavior

The tfx docker image contains conflicting dependencies: apache-beam and google-cloud-datastore.

docker run --rm --entrypoint python tensorflow/tfx:1.15.1 -m pip list | grep -E 'apache|google-cloud-datastore'

apache-beam                              2.56.0
google-cloud-datastore                   1.15.5

From the apache-beam dependency constraints we can see that version 2.56.0 requires google-cloud-datastore>=2.0.0,<3. Having google-cloud-datastore 1.15.5 in the base image violates this constraint and may cause bugs.

Describe the expected behavior

The docker TFX image should contain no conflicting dependencies.

Name of your Organization (Optional)

Takealot.com

Other info / logs

We use the TFX docker image as a base image into which we install additional packages. For this to work, we must not install conflicting dependencies. The solution is the use a dependency solver (like pip-tools pip-compile or uv pip compile) to constrain the dependencies we install against those already in the image. However, if the dependencies already in the image are conflicting, it is impossible to install additional packages reliably.

This was not a problem in TFX 1.14

IzakMaraisTAL avatar Jul 16 '24 12:07 IzakMaraisTAL

Using a dependency solver suggests you need to update to google-cloud-datastore==2.19.0 and google-api-core==2.19.1

IzakMaraisTAL avatar Jul 16 '24 12:07 IzakMaraisTAL

Hi @IzakMaraisTAL, sorry for taking this issue too late.

I also tried to build the docker image from my environment, but the actual issue arose from the old Python package cloud-tpu-client from the base image "gcr.io/deeplearning-platform-release/tf2-gpu.2-15.py310"

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.
cloud-tpu-client 0.10 requires google-api-python-client==1.8.0, but you have google-api-python-client 1.12.11 which is incompatible.

I personally thought it is not a good idea to lower the google-api-python-client or the other things' versions. I will ask TF team to know if cloud-tpu-client (or the other hindering packages) is needed for the base docker image. Thanks!

lego0901 avatar Aug 12 '24 09:08 lego0901

Hi @IzakMaraisTAL tensorflow/tfx:1.16.0-rc0 contains below dependency:

docker run --rm --entrypoint python tensorflow/tfx:1.16.0-rc0 -m pip list | grep -E 'apache|google-cloud-datastore'
apache-beam                              2.61.0
google-cloud-datastore                   2.20.1

Kindly explore the latest tensorflow/tfx:1.16.0-rc0 docker image. Please feel free to reach out to us if required. Thank you!

janasangeetha avatar Dec 12 '24 06:12 janasangeetha

This issue has been marked stale because it has no recent activity since 7 days. It will be closed if no further activity occurs. Thank you.

github-actions[bot] avatar Dec 21 '24 01:12 github-actions[bot]

This issue was closed due to lack of activity after being marked stale for past 7 days.

github-actions[bot] avatar Dec 29 '24 02:12 github-actions[bot]

Are you satisfied with the resolution of your issue? Yes No

github-actions[bot] avatar Dec 29 '24 02:12 github-actions[bot]