9 unstable releases (3 breaking)
Uses new Rust 2024
| 0.4.0 | Oct 29, 2025 |
|---|---|
| 0.3.3 | Oct 27, 2025 |
| 0.2.0 | Oct 22, 2025 |
| 0.1.5 | Oct 22, 2025 |
#480 in Web programming
100KB
3.5K
SLoC
adpt
A command line tool for interacting with the Adaptive Platform.
Installation
cargo install adpt
Or on ARM-based macs brew can be used:
brew install adaptive-ml/homebrew-tap/adpt
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:
adpt set-apt-key
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:
echo -e "\nsource <(COMPLETE=zsh adpt)" >> ~/.zshrc
Note that completions for things like recipe keys will only work when a default usecase is configured.
Usage
Specifying the use case
Most commands require a --usecase option to specify the use case:
adpt recipes --usecase my-usecase
However to avoid specifying this every time, the DEFAULT_USECASE environment
variable or the default_usecase configuration file option.:
Setting API Key
Store your API key in the system keyring:
adpt set-api-key <your-api-key>
Running Recipes
Run a recipe by its ID or key:
adpt run <recipe-key-or-id>
Run a recipe with parameters from a JSON file:
adpt run my-recipe --parameters params.json
Run a recipe with custom settings:
adpt run my-recipe --name "My Custom Run" --compute-pool gpu-pool --num-gpus 4
Publishing Recipes
Publish a recipe from a file or a directory containing a main.py:
adpt publish /path/to/recipe-directory
Publish a recipe with a custom name and key:
adpt publish /path/to/recipe --name "My Recipe" --key my-recipe-key
Listing Recipes
List all available recipes:
adpt recipes
Monitoring Jobs
Get the status of a specific job:
adpt job <job-id>
Follow a job's progress until completion:
adpt job <job-id> --follow
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 use case for operations
default_use_case = "my-usecase"
# Base URL for the Adaptive platform
adaptive_base_url = "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>
Dependencies
~180MB
~4.5M SLoC