# Install heliaEDGE

This site follows the repository's `main` branch. The generated API and guides can include changes that are not yet in a PyPI release. Use a source checkout to follow the examples against the same API; use PyPI when you need a released package.

## Choose your installation

Use Python 3.12.3 or newer: 3.12–3.13 for TensorFlow and LiteRT, or 3.12–3.14 for Torch and framework-independent helpers.

Use this path for the API documented on this site. Clone once, then select your backend:

```sh
git clone https://github.com/AmbiqAI/helia-edge.git
cd helia-edge
```

```sh
uv sync --python 3.12 --extra tensorflow
```

```sh
uv sync --python 3.12 --extra torch
```

Run scripts with `uv run`. Record `git rev-parse HEAD` with your experiments.

Release 0.6.2 uses the earlier TensorFlow-based API and includes plotting and AWS dependencies by default. Use the source checkout for the portable TensorFlow/PyTorch APIs and optional capability extras described on this site.

```sh
pip install 'helia-edge==0.6.2'
```

```sh
uv add 'helia-edge==0.6.2'
```

The 0.6.2 release offers a `litert` extra; it has no `torch`, `tensorflow`, `plotting` or `aws` extras.

Add plotting, S3 access or model conversion

In a source checkout, choose only the capabilities your workflow uses. Combine extras with `uv sync`:

```sh
uv sync --python 3.12 --extra tensorflow --extra plotting --extra aws
```

| Extra | Adds |
|---|---|
| `plotting` | Training history, confusion matrices and patch visualization |
| `aws` | S3 downloads and model retrieval |
| `litert` | TensorFlow conversion and LiteRT host prediction |

The source package without backend extras installs framework-independent helpers without a training backend. JAX is outside the tested matrix.

## Check the environment

Run this in a fresh Python process in the environment you installed:

```python
import os
os.environ["KERAS_BACKEND"] = "tensorflow"

from importlib.metadata import version
import keras
import helia_edge

print("heliaEDGE:", version("helia-edge"))
print("Keras backend:", keras.backend.backend())
```

```python
import os
os.environ["KERAS_BACKEND"] = "torch"

from importlib.metadata import version
import keras
import helia_edge

print("heliaEDGE:", version("helia-edge"))
print("Keras backend:", keras.backend.backend())
```

The backend should match your selection. A source checkout can retain the package version from the last release, so use the Git revision to identify source behavior.

Troubleshoot installation and imports

| Symptom | Next step |
|---|---|
| Missing TensorFlow or Torch | Install the matching extra in the environment running the script. |
| The wrong backend is active | Set `KERAS_BACKEND` before importing Keras, then restart the Python process or notebook kernel. |
| A documented import is missing | Check whether you installed a release or the source revision used by the docs. |
| A saved model reports an unknown custom class | Follow the registration steps in the save/load guide. |

## Next step

- [Build your first model](https://ambiqai.github.io/helia-edge/getting-started/first-model/): Construct and save a small TCN using typed configuration.
- [Train a CIFAR-10 model](https://ambiqai.github.io/helia-edge/examples/train-cifar-model/): Follow a complete notebook from data preparation to training.
