Skip to content

How can I pass dynamically generated inputs into a k8s_job_op #18050

Answered by prha
dagsir[bot] bot asked this question in Q&A
Discussion options

You must be logged in to vote

In order to support this, rather than using k8s_job_op, you could use execute_k8s_job (docs link) and use your own op definition.

Example:

@op
def my_custom_op(context):
    execute_k8s_job(...) # does something
    return "my/file/path"

@op
def my_second_custom_op(context, path: str):
    execute_k8s_job(...) # does something else, maybe using path

@job
def my_job_with_custom_ops():
    my_second_custom_op(my_custom_op())

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by prha
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant