A command line tool for interacting with the Adaptive Platform.
cargo install adptOr on ARM-based macs brew can be used:
brew install adaptive-ml/homebrew-tap/adptOnce 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-keyAdditionally 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.
To set up completions for zsh run the following:
echo -e "\nsource <(COMPLETE=zsh adpt)" >> ~/.zshrcNote that completions for things like recipe keys will only work when a default usecase is configured.
Most commands require a --usecase option to specify the use case:
adpt recipes --usecase my-usecaseHowever to avoid specifying this every time, the DEFAULT_USE_CASE environment
variable or the default_use_case configuration file option.:
Store your API key in the system keyring:
adpt set-api-key <your-api-key>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.jsonRun a recipe with custom settings:
adpt run my-recipe --name "My Custom Run" --compute-pool gpu-pool --num-gpus 4Publish a recipe from a file or a directory containing a main.py:
adpt publish /path/to/recipe-directoryPublish a recipe with a custom name and key:
adpt publish /path/to/recipe --name "My Recipe" --key my-recipe-keyList all available recipes:
adpt recipesUpload a dataset:
adpt upload /path/to/datasetGet the status of a specific job:
adpt job <job-id>Follow a job's progress until completion:
adpt job <job-id> --followEnvionrment variables may be specified using a .env file in a parent folder.
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 |
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"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>