Skip to content

Trouble running custom TFX component on Vertex AI (Kubeflow Runner) — Executor import error #7781

Description

@crbl1122

If the bug is related to a specific library below, please raise an issue in the
respective repo directly:

TensorFlow Data Validation Repo

TensorFlow Model Analysis Repo

TensorFlow Transform Repo

TensorFlow Serving Repo

System information

  • Have I specified the code to reproduce the issue (Yes, No):
  • Environment in which the code is executed (e.g., Local(Linux/MacOS/Windows),
    Interactive Notebook, Google Cloud, etc):
  • TensorFlow version:
  • TFX Version:
  • Python version:
  • Python dependencies (from pip freeze output):

Describe the current behavior

I’m trying to run a simple custom TFX component using the Kubeflow Runner on GCP Vertex AI.

I’ve defined the component in two ways: Using the @component decorator, and as a fully custom component (with a defined Executor and ComponentSpec).

In both cases, pipeline compilation succeeds, but when I run the pipeline, I get the following error:

ImportError: Executor class couldn’t be found in main

I also tried packaging the component into a .tar.gz file and uploading it to Cloud Storage, but the result was the same.

Environment details:

TFX version: 1.15 Runner: KubeflowDagRunner Platform: Vertex AI Pipelines

Has anyone successfully run a custom TFX component on GCP using the Kubeflow runner? If so, how did you structure or package your component so that the Executor is properly found during execution? I couldn't find any documentation or tutorial about this.

Describe the expected behavior

Successfully running a custom TFX component in Vertex AI using Kubeflow Runner

Standalone code to reproduce the issue

Providing a bare minimum test case or step(s) to reproduce the problem will
greatly help us to debug the issue. If possible, please share a link to
Colab/Jupyter/any notebook.

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions