adpt
A command line tool for interacting with the Adaptive Platform.
Installation
MacOS
On ARM-based macs brew can be used:
Windows
On x86-based Windows winget can be used:
winget install --source winget AdaptiveML.adpt
Everything else
Once installed an API key must be specified for use. This can be done using the
ADAPTIVE_API_KEY environment variable, or alternatively stored in your
operating system's keyring using the below command:
Additionally your adaptive instance may be specified either via the
ADAPTIVE_BASE_URL environment variable or via a configuration file as
described in the configuration section below.
Completions
To set up completions for zsh run the following:
Note that completions for things like recipe keys will only work when a default project is configured.
Usage
Specifying the project
Most commands require a --project option to specify the project:
However to avoid specifying this every time, the DEFAULT_USE_CASE environment
variable or the default_project configuration file option.:
Setting API Key
Store your API key in the system keyring:
Running Recipes
Run a recipe by its ID or key:
Run a recipe with parameters from a JSON file:
Run a recipe with custom settings:
Publishing Recipes
Publish a recipe from a file or a directory containing a main.py:
Publish a recipe with a custom name and key:
Listing Recipes
List all available recipes:
Uploading datasets
Upload a dataset:
Monitoring Jobs
Get the status of a specific job:
Follow a job's progress until completion:
Configuration
Env file
Envionrment variables may be specified using a .env file in a parent folder.
Configuration File Locations
Configuration files are stored in platform-specific locations:
| Platform | Configuration File Path |
|---|---|
| Linux | ~/.config/adpt/config.toml or $XDG_CONFIG_HOME/adpt/config.toml |
| macOS | ~/.adpt/config.toml |
| Windows | %APPDATA%\adaptive-ml\adpt\config\config.toml |
Configuration File Format
The configuration file uses TOML format and supports the following options:
# Default project for operations
= "my-project"
# Base URL for the Adaptive platform
= "https://your-adaptive-instance.com"
API Key Storage
The API key can be provided in two ways (in order of priority):
- Environment Variable: Set
ADAPTIVE_API_KEYenvironment variable - System Keyring: Store securely using
adpt set-api-key <your-key>