Argo Full Movie 123

0 views
Skip to first unread message

Beverly Denmark

unread,
Aug 4, 2024, 6:07:29 PM8/4/24
to senbeadssmoothke
ArgoWorkflows is a Kubernetes-native workfloworchestrator - you can read Argo Workflows documentation to learn all aboutit. If you just want to getyour flow in production, this document contains everything you need to know.

When running on Argo Workflows, Metaflow code works exactly as it does locally: Nochanges are required in the code. All data artifacts produced by steps run on ArgoWorkflows are available using the Client API. All tasks arerun on Kubernetes respecting the @resources decorator, as if the @kubernetesdecorator was added to all steps, as explained in Executing TasksRemotely.


This document describes the basics of Argo Workflows scheduling. If your projectinvolves multiple people, multiple workflows, or it is becoming business-critical, checkout the section around coordinating larger Metaflowprojects.


It is highly recommended that you enableretries when deployingto Argo Workflows, which you can do easily with --with retry as shown above. However,make sure that all your steps are safe to retry before you do this. If some of yoursteps interact with external services in ways that can't tolerate automatic retries,decorate them with retry with times set to zero (times=0) as described in How toPrevent Retries.


If you run argo-workflows create again, it will create a new version of your flow onArgo Workflows. The newest version becomes the production version automatically. If youwant to test on Argo Workflows without interfering with a production flow, you canchange the name of your class, e.g. from ParameterFlow to ParameterFlowStaging, andargo-workflows create the flow under a new name or use the@projectdecorator.


By default, Metaflow configures Argo Workflows to execute at most 100 tasks concurrentlywithin a foreach step. This should ensure that most workflows finish quickly withoutoverwhelming your Kubernetes cluster, the execution backend.


If your workflow includes a large foreach and you need results faster, you can increasethe default with the --max-workers option. For instance, argo-workflows create--max-workers 500 allows 500 tasks to be executed concurrently for every foreach step.


For instance, you can change the default value of a Parameter based on who deployed theworkflow or what Git branch the deployment was executed in. Crucially, the function inParameter is evaluated only once during argo-workflows create and not during theexecution of the flow.


When argo-workflows create is called, deployment_info is evaluated which capturesyour username and the time of deployment. This information remains constant on ArgoWorkflows, although the user may override the default value.


The context object is passed to any function defined in Parameter. It contains variousfields related to the flow being deployed. By relying on the values passed in context,you can create generic deploy-time functions that can be reused by multiple flows.


The graph visualization shows that step b failed, as expected. First, you shouldinspect the logs of the failed step to get an idea of why it failed. You can accessKubernetes step logs in the Argo Workflows UI by selecting the failed task and clickingon the logs button.


You can fix the error locally as above. In the case of this simple flow, you can run thewhole flow locally to confirm that the fix works. After validating the results, youwould deploy a new version to production with argo-workflows create.


However, this might not be a feasible approach for complex production flow. Forinstance, the flow might process large amounts of data that can not be handled in yourlocal instance. We have better approaches for staging flows for production:


Alternatively, you can change the name of the flow temporarily, e.g. from DebugFlow toDebugFlowStaging. Then you can run argo-workflows create with the new name, which willcreate a separate staging flow on Argo Workflows. You can also use the@projectdecorator.

3a8082e126
Reply all
Reply to author
Forward
0 new messages