diff --git a/docs/metaflow/composing-flows/custom-decorators.md b/docs/metaflow/composing-flows/custom-decorators.md index d85d68af..45b5eaa1 100644 --- a/docs/metaflow/composing-flows/custom-decorators.md +++ b/docs/metaflow/composing-flows/custom-decorators.md @@ -107,7 +107,9 @@ python waiterflow.py run --with myprofiler.my_profile Custom decorators don't require special treatment when [executing tasks in the cloud](/scaling/remote-tasks/introduction) or when [deploying flows to production](/production/introduction) - -they will get [packaged automatically by Metaflow](/scaling/dependencies#unpacking-a-metaflow-project). Try it: +they will get [packaged automatically by Metaflow](/scaling/dependencies#unpacking-a-metaflow-project). You don't +even need to `import` the decorators if you add them with `--with`. Try it: + ``` python waiterflow.py run --with myprofiler.my_profile --with kubernetes ``` diff --git a/docs/metaflow/composing-flows/mutators.md b/docs/metaflow/composing-flows/mutators.md index 80248365..0829a953 100644 --- a/docs/metaflow/composing-flows/mutators.md +++ b/docs/metaflow/composing-flows/mutators.md @@ -122,6 +122,8 @@ You can test the effect of the options with `@robust_flow` above. You can see th python failflow.py dump RUN_ID/start ``` +Note that the same options apply to adding flow-level decorators as well. + ## Introspecting a flow and applying configs Let's walk through a more advanced mutator that shows how you can diff --git a/docs/scaling/failures.md b/docs/scaling/failures.md index 54316e65..07147e60 100644 --- a/docs/scaling/failures.md +++ b/docs/scaling/failures.md @@ -383,6 +383,15 @@ if __name__ == "__main__": Note that when deployed on Argo Workflows, exit hook functions execute as separate containers (pods), so they will execute even if steps fail e.g. due to out of memory condition. +### Custom dependencies in exit hooks + +Since exit hook functions are not steps, you can't use `@pypi` or `@conda` to manage +their dependencies. +Instead, you can provide a custom image in `options={'image': ...}` like here: +``` +@exit_hook(on_error=[failure_print], options={"image": URL_TO_AN_IMAGE}) +``` + ## Summary Here is a quick summary of failure handling in Metaflow: