Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ability to trigger existing workflows #2043

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

madhur-ob
Copy link
Collaborator

Replaces #1955
Should only be merged after #2041
Also includes changes from #2042

Usage:

with Deployer(
    flow_file="../../try.py",
    branch="hello",
    production=True,
    environment="conda"
).argo_workflows() as ar:
    ar_obj = ar.create()

    # save this somewhere / remember it...
    identifier = ar_obj.name
    metadata = ar_obj.metadata

    # beta is a user defined parameter in flow file '../../try.py'
    df = DeployedFlow.from_deployment(identifier=identifier, metadata=metadata)
    triggered_run = df.trigger(beta={"madhur": "cool"})

@madhur-ob
Copy link
Collaborator Author

We can now do:

identifier = "parameterflowproject.user.madhurtandon23gmail.com.parameterflow"
metadata = "service@https://metadata.dev-latest.outerbounds.xyz/p/default/"

df = DeployedFlow.from_deployment(identifier=identifier, metadata=metadata)

triggered_run = df.trigger(beta={"madhur": "cool"}, myfile="/Users/madhur/Desktop/output.csv")

some variants..

df = DeployedFlow.from_deployment(identifier=identifier, metadata=metadata, impl="xxx")

OR
without passing in impl, one can also do:

METAFLOW_FROM_DEPLOYMENT_IMPL=zzz python demo.py

The method from_argo_workflows_deployment is now removed and only a single from_deployment exists to which one can pass a specific impl or perhaps also set the config variable: METAFLOW_FROM_DEPLOYMENT_IMPL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants