File tree Expand file tree Collapse file tree 3 files changed +14
-1
lines changed Expand file tree Collapse file tree 3 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -107,7 +107,9 @@ python waiterflow.py run --with myprofiler.my_profile
107107
108108Custom decorators don't require special treatment when [ executing tasks in
109109the cloud] ( /scaling/remote-tasks/introduction ) or when [ deploying flows to production] ( /production/introduction ) -
110- they will get [ packaged automatically by Metaflow] ( /scaling/dependencies#unpacking-a-metaflow-project ) . Try it:
110+ they will get [ packaged automatically by Metaflow] ( /scaling/dependencies#unpacking-a-metaflow-project ) . You don't
111+ even need to ` import ` the decorators if you add them with ` --with ` . Try it:
112+
111113```
112114python waiterflow.py run --with myprofiler.my_profile --with kubernetes
113115```
Original file line number Diff line number Diff line change @@ -122,6 +122,8 @@ You can test the effect of the options with `@robust_flow` above. You can see th
122122python failflow.py dump RUN_ID/start
123123```
124124
125+ Note that the same options apply to adding flow-level decorators as well.
126+
125127## Introspecting a flow and applying configs
126128
127129Let's walk through a more advanced mutator that shows how you can
Original file line number Diff line number Diff line change @@ -383,6 +383,15 @@ if __name__ == "__main__":
383383Note that when deployed on Argo Workflows, exit hook functions execute as separate
384384containers (pods), so they will execute even if steps fail e.g. due to out of memory condition.
385385
386+ ### Custom dependencies in exit hooks
387+
388+ Since exit hook functions are not steps, you can't use ` @pypi ` or ` @conda ` to manage
389+ their dependencies.
390+ Instead, you can provide a custom image in ` options={'image': ...} ` like here:
391+ ```
392+ @exit_hook(on_error=[failure_print], options={"image": URL_TO_AN_IMAGE})
393+ ```
394+
386395## Summary
387396
388397Here is a quick summary of failure handling in Metaflow:
You can’t perform that action at this time.
0 commit comments