1

Usually, KFP v2 supports adding a component decorator like this:

@component
def test():
  print("hello world")

I would like to add an additional decorator to add new functionality like this:

@component
@added_functionality
def test():
  print("hello world")

Where added_functionality is imported and looks like this:

from functools import wraps

def added_functionality(func):
  print("starting added functionality")

  @wraps(func)
  def wrapper(*args, **kwargs):
    print("starting wrapper")
    return func(*args, **kwargs)

  return wrapper

The issue is that when I compile the pipeline, I see 'starting added functionality' printed to the console, but "starting wrapper" doesn't show up in the log in Vertex AI. Am I doing something wrong?

Optimus
  • 1,354
  • 1
  • 21
  • 40

1 Answers1

1

You aren't. This is a disappointing limitation of Kubeflow currently.

John R
  • 1,505
  • 10
  • 18