Learn how to write a simple custom recipe
adaptive_harmony
first:
Create a new python file
my_custom_recipe.py
@recipe_main
defines a single async function in the file as the main entrypoint that Adaptive Engine should run when the recipe is launched. This decorator is required in order to upload a recipe to Adaptive.get_client
directly as explained in Harmony client and local testing
. You can then just run python my_custom_recipe.py
without concerning yourself with RecipeContext
. When you upload your recipe to Adaptive however, RecipeContext
is a mandatory input argument for your @recipe_main
function.Load models
.tp()
.Load Dataset
StringThread
, the format for chat messages + metadata used throughout Adaptive recipes. See Loading datasets and StringThread to find out how to load a dataset that has been uploaded to Adaptive.Define a Grader
grader.setup()
handles preparing the grader for training or evaluation, which in this case actually spawns the judge model.Adapt the model