Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docs/metaflow/composing-flows/custom-decorators.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand Down
2 changes: 2 additions & 0 deletions docs/metaflow/composing-flows/mutators.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 9 additions & 0 deletions docs/scaling/failures.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Loading