Skip to main content

From The Adaptive UI

Runs are the instantiation of a running recipe. They are executed on the same underlying infrastructure where the Adaptive Engine compute plane is hosted. To create a run from the Adaptive UI, you would:
  1. Select the recipe that you want to run from the “Recipe” tab
  2. Specify values for the config. The Adaptive UI automatically create widgets to input values based on the types of your config fields (see the image below)
  3. Review your recipe and launch the run
Below is an example of the UI to launch a simple recipe (see Input configuration to learn how to create input configurations for your recipes).

From the SDK

The Adaptive SDK provides a comprehensive interface for managing custom recipes. You can upload your recipe files, list existing recipes, and launch training jobs programmatically. First, initialize the Adaptive SDK client:

Uploading Custom Recipes

Use adaptive.recipes.upload() to upload your recipe to the platform. path can point to a single file or a directory with multiple files.
If you are passing a directory path, the file where your @recipe_main is defined must be named main.py. Furthermore, all imports in your code must be relative (i.e from .other_file import some_class instead of from other_file import some_class).

Listing Recipes

Use adaptive.recipes.list() to view all available recipes. To list all recipes:

Inspecting the input schema of a recipe

Use adaptive.recipe.get() to get a specific recipe’s json schema. You can construct your input parameters dict from this schema.
.json_schema is the simplified json_schema you can use as reference to build your input payload. You also have .input_schema, which will point out what fields are AdaptiveDataset, AdaptiveModel or AdaptiveGrader.
You can also generate a sample input dictionary from the json schema with mock data, to facilitate building your own (valid) input with adaptive.recipe.generate_sample_input().

Launching a Run

Use adaptive.recipes.run() to launch a run from a recipe. Arguments to pass to the recipe config should be given in the input_args argument and should strictly adhere to the config defined in the recipe.