2.3. Clone Installation
Use this path if you want the examples/ folder and wrapper scripts, or you plan to
add or change models (including Bring Your Own Model (BYOM)). You clone one
repository, tinyml-modelzoo, and install it in editable mode.
2.3.1. Step 1: Clone the Repository
Note
Windows: enable long paths once per system before cloning:
git config --global core.longpaths true
git clone https://github.com/TexasInstruments/tinyml-modelzoo.git
cd tinyml-modelzoo
Only this repository is needed. Do not clone tinyml-modelmaker, tinyml-tinyverse
or tinyml-modeloptimization, and do not use tinyml-tensorlab (deprecated, its
source is private).
2.3.2. Step 2: Create a Virtual Environment and Install
python3.10 -m venv venv
source venv/bin/activate
python -m pip install --upgrade pip setuptools wheel
pip install -e .
python -m venv venv
.\venv\Scripts\Activate.ps1
python -m pip install --upgrade pip setuptools wheel
pip install -e .
pip install -e . installs tinyml_modelzoo from your clone (edits to
tinyml_modelzoo/models take effect immediately) and downloads tinyml_modelmaker
as a prebuilt wheel from TI’s server. ModelMaker brings in tinyml_tinyverse,
tinyml_torchmodelopt and ti_mcu_nnc.
2.3.3. Step 3: Verify Installation
import tinyml_modelmaker, tinyml_tinyverse, tinyml_torchmodelopt, tinyml_modelzoo
print(tinyml_modelmaker.__version__, tinyml_tinyverse.__version__,
tinyml_torchmodelopt.__version__, tinyml_modelzoo.__version__)
2.3.4. Step 4: Configure the Compiler
Set the environment variable for your target device so ModelMaker can compile. See Environment Variables.
2.3.5. Step 5: Run the Hello World Example
./run_tinyml_modelzoo.sh examples/generic_timeseries_classification/config.yaml
run_tinyml_modelzoo.bat examples\generic_timeseries_classification\config.yaml
./run_tinyml_modelzoo.ps1 examples/generic_timeseries_classification/config.yaml
The scripts only check that tinyml_modelmaker can be imported and then run
python -m tinyml_modelmaker.run_tinyml_modelmaker <config>. Output goes to
./data/projects/ relative to the directory you ran the script from.
2.3.6. Folder Layout
tinyml-modelzoo/
├── examples/ # ready-to-run configs
├── tinyml_modelzoo/
│ ├── models/ # model definitions
│ └── model_descriptions/ # model names used in configs
├── docs/ # guides
├── run_tinyml_modelzoo.sh / .bat / .ps1
├── estimate_memory.py / .sh
└── ADDING_NEW_MODELS.md
2.3.7. Common Developer Tasks
Add a model: see Adding Models to ModelZoo and Bring Your Own Model (BYOM); the model files live in
tinyml_modelzoo/models/and are registered intinyml_modelzoo/model_descriptions/.Add your own example: copy an
examples/<name>/config.yamland adapt it (How to Create a ModelZoo Config YAML).
2.3.8. Updating
git pull origin main
pip install -e .
2.3.9. Troubleshooting
- “Error: tinyml_modelmaker is not installed” (from the run script)
Activate your virtual environment and run
pip install -e .insidetinyml-modelzoo.- Permission denied on the .sh script
chmod +x run_tinyml_modelzoo.sh- PowerShell blocks the .ps1 script
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser