Spotty
raw JSON → 1.3.3 verified Sat May 09 auth: no python
Spotty is a tool for training deep learning models on AWS and GCP spot/preemptible instances. It manages cloud instance lifecycle, Docker container environment, and file syncing. Current version 1.3.3 (December 2023), with irregular releases approximately every 3-6 months.
pip install spotty Common errors
error ImportError: No module named spotty.aws ↓
cause Since v1.2.0 AWS-specific commands moved under 'spotty aws' subcommand, but the Python module spotty.aws may not exist or be restructured.
fix
Use CLI commands like 'spotty aws create-ami' instead of Python imports. For programmatic use, import from spotty.providers.aws.
error spotty: error: argument --sync: invalid choice: '--no-sync' (choose from '--sync') ↓
cause Using old flag --sync with v1.3.0+ which replaced it with --no-sync.
fix
Use '--no-sync' flag to skip sync, and omit flag for default sync behavior.
Warnings
breaking Spotty v1.3.0 changed default instance type from spot to on-demand. Set `spotInstance: true` in YAML config for AWS or `preemptibleInstance: true` for GCP. ↓
fix Add `spotInstance: true` (AWS) or `preemptibleInstance: true` (GCP) to your .spotty/config.yaml under the instance parameters.
breaking Volumes/disks are now retained by default when an instance is stopped. In v1.2.x and earlier, volumes were deleted on stop unless explicitly configured. ↓
fix To delete volumes on stop, set deletion policy to 'delete' in your config. For AWS EBS: `deletionPolicy: delete`. For GCP: not yet implemented per v1.2.3 changelog.
gotcha The `spotty run` command now syncs the project before running by default, opposite of previous behavior. The `-S/--sync` flag is replaced with `--no-sync` flag. ↓
fix To skip syncing, use `spotty run --no-sync "command"`.
gotcha Configuration format changed in v1.2.0: container parameters are now separate from instance parameters, and the config file describes a list of instances instead of a single one. ↓
fix Refer to the new YAML format at https://github.com/spotty-cloud/spotty#configuration. Old configs will not work.
Imports
- abstract classes and utilities wrong
from spotty.aws import instancecorrectfrom spotty.providers.aws.instance import AwsInstance
Quickstart
cd my_project
spotty init --provider aws
spotty start # starts EC2 instance
spotty sh # SSH into instance
spotty stop # stops instance (retains volumes by default)
spotty run "python train.py" # syncs project and runs command