Hooks

Note: Hooks are currently on the commercial version only, but will be available on Polyaxon CE soon

If you are using Polyaxon, you are already aware that you can provide:

  • init containers: an interface for users to run init containers before the main container containing the logic for training models or processing data.
  • sidecar containers: specialized containers running as sidecars to the main container.

The hooks interface is an extension to complete the lifecycle with a post-done logic. Typically, hooks, are operations that run after the main logic, to notify external systems, trigger evaluation logic, generate reports, …

Compared to init and sidecars abstractions, we made the decision to run hooks outside of the pod where the main logic is running for several reasons:

  • To allow users to release important resources, e.g. GPU/TPU that might not be needed for running the hook(s).
  • To make a distinction of what users should be running in such operations, normally we expect that users should use this interface to run recurrent and abstracted logic that depends on an upstream operation, yet applies to most operations with similar characteristics.

Users can run full components, with their own init and sidecars in hooks, and can run many hooks per operation following:

  • A trigger.
  • A set of conditions
  • And based on the full context of the main operation.

All valid hooks will be automatically scheduled to run as soon as the main operation reaches a final status.

Learn More about Polyaxon

This blog post just goes over a couple of features that we shipped since our last product update, there are several other features and fixes that are worth checking. To learn more about all the features, fixes, and enhancements, please visit the release notes.

Polyaxon continues to grow quickly and keeps improving and providing the simplest machine learning abstraction. We hope that these updates will improve your workflows and increase your productivity, and again, thank you for your continued feedback and support.