Overview
Recipe configurations allow you to define parameters that can be passed to your custom recipes. This provides flexibility and reusability, enabling you to run the same recipe with different parameters without modifying the code.Basic configuration structure
Every recipe configuration inherits fromInputConfig
, and it defines the parameters your recipe requires and/or optional “knobs” you want to expose for other users to tweak.
Using your configuration
Once you’ve defined a configuration class, you can use it in your recipe by passing it as an input argument to your@recipe_main function
.
Field Types and Annotations
Once you are done developing and you upload your recipe to the recipe library in your Adaptive Deployment, you’ll want to make it as easy as possible for yourself or team mates to reuse it in the future. Adaptive automatically converts your input configurations into self-documented and type-safe widgets in the UI (enforcing types in Python SDK as well). See an example of a very simple recipe config as rendered in the UI (you will find out more in launch recipe):
Giving field types in the config will make sure to work with proper type and will render the field with the right widget in the UI.
Below are all the types that you can define.