# Modes overview

Modes are the steps in a sleepKIT task: acquire data, generate features, train, evaluate, export, and run a demo. Select a mode with `--mode` and provide the task configuration with `--config`.

## Choose a mode

| Mode | Purpose | Guide |
| --- | --- | --- |
| `download` | Fetch the datasets selected in your configuration. | [Download datasets](https://ambiqai.github.io/sleepkit/modes/download/) |
| `feature` | Generate features from your datasets. | [Feature generation](https://ambiqai.github.io/sleepkit/features/) |
| `train` | Train the task model with the configured features and settings. | [Train a model](https://ambiqai.github.io/sleepkit/modes/train/) |
| `evaluate` | Evaluate the model on the configured test data. | [Evaluate a model](https://ambiqai.github.io/sleepkit/modes/evaluate/) |
| `export` | Convert the trained model for deployment. | [Export a model](https://ambiqai.github.io/sleepkit/modes/export/) |
| `demo` | Run a task-level demonstration with the configured backend. | [Run a demo](https://ambiqai.github.io/sleepkit/modes/demo/) |

## Run a step

```bash title="Train a staging model"
sleepkit --mode train --task stage --config configuration.json
```

Use the same configuration for related steps so that dataset, feature and model settings stay consistent. Complete data download and feature generation before training; evaluate the trained model before exporting it.

Demo support depends on the task and backend. See the demo guide for setup and limitations; running a demo does not establish model accuracy.

## Python workflow

The Python interface exposes the same task operations for scripts and notebooks. See [Quickstart](https://ambiqai.github.io/sleepkit/quickstart/#use-sleepkit-with-python) for a configuration-driven example and [Configuration](https://ambiqai.github.io/sleepkit/modes/configuration/) for parameter definitions.
