Tfx: TFX CLI using the TFX Docker container image https://hub.docker.com/r/tensorflow/tfx

Created on 19 Mar 2021  路  8Comments  路  Source: tensorflow/tfx

System information

  • Have I specified the code to reproduce the issue(Yes/No): yes
  • Environment in which the code is executed (e.g., Local(Linux/MacOS/Windows),
    Interactive Notebook, Google Cloud, etc): Cloud Build
  • TensorFlow version (you are using): /
  • TFX Version: 0.28.0
  • Python version: 3

Describe the current behavior
The TFX Docker container image (https://hub.docker.com/r/tensorflow/tfx) runs into error when using as part of a CI/CD pipeline (TFX CLI)

Error:

Step #1: Status: Downloaded newer image for tensorflow/tfx:latest
Step #1: docker.io/tensorflow/tfx:latest
Step #1: 2021/03/19 18:50:40 No id provided.
Finished Step #1
ERROR
ERROR: build step 1 "tensorflow/tfx" failed: step exited with non-zero status: 1

Usage:

- name: 'tensorflow/tfx'
    args: ['pipeline', 'create', '--engine', 'kubeflow', '--pipeline_path', 'runner.py', '--endpoint', 'removed']
    dir: 'pipeline'

In my opinion this would be working with the default TFX container image.
Can someone confirm or deny?
As workaround, I created my own docker image which basically calls the same

FROM ...
ENTRYPOINT ["tfx"]

Describe the expected behavior
no error

Standalone code to reproduce the issue
see above

Name of your Organization (Optional)
/

Other info / logs

Include any logs or source code that would be helpful to diagnose the problem.
If including tracebacks, please include the full traceback. Large logs and files
should be attached.

awaiting tensorflower bug

All 8 comments

TFX Docker image is meant to be used as single component runner in different orchestration platforms. For example if TFX is running on KFP, each component invocation is done via ContainerOp, which runs the tensorflow/tfx docker image with proper arguments to just run a single component with desired inputs. I'm not very familar with current ENTRYPOINT which is /opt/apache/beam/boot, but probably it will be used in some other orchestrators (maybe local Beam DAG runner?). The image is NOT meant to be used as a CLI executables (e.g. tfx pipeline create commands). We usually run CLI commands in local python environment where tfx package is installed.

Thanks @chongkong
In that case, we keep our custom docker image as part of our CD process.

Probably worth officially maintain a Docker image for the CLI commands.
This would allow much easier integration. What is your opinion on that?

I don't have a strong opinion on this, but I can bring your suggestion to our backlog :)

@chongkong
Yes, please.

Can you share the link to the backlog?
Great to get some insights into whats might coming up and already discussed.

Unfortunately we don't maintain our backlogs in public yet.. Will keep you posted on the progress!

Thanks a lot Jongbin

@SaschaHeyer I have a quick question on this.

Have you tried entrypoint config of cloudbuild.yaml? It seems like we can override the entrypoint and don't need to have a separate image.

@jiyongjung0 good point give it a try this week and get back to you

Was this page helpful?
0 / 5 - 0 ratings