2.2. User Installation
This guide covers the quick installation method for users who want to use Tiny ML Tensorlab without modifying the source code.
Note
This installation method provides read-only access to the toolchain. If you need to customize models or add new features, use Developer Installation instead.
2.2.1. Quick Install
Install Tiny ML Tensorlab directly from GitHub:
pip install git+https://github.com/TexasInstruments/tinyml-tensorlab.git@main#subdirectory=tinyml-modelmaker
This installs:
tinyml-modelmaker- The main orchestration tooltinyml-tinyverse- Core training infrastructuretinyml-modelzoo- Model definitionstinyml-modeloptimization- Quantization toolkit
2.2.2. Running Your First Example
Warning
IMPORTANT: Environment Variables Required for Model Compilation
For AI model compilation to work, you MUST set environment variables specific to your target device before running examples.
The variables you need depend on which device you’re targeting:
C2000 devices (F28P55, F28P65, etc.): Set
C2000_CG_ROOTandC2000WARE_ROOTF29 devices (F29H85X, etc.): Set
CG_TOOL_ROOTMSPM0 devices: Set
ARM_LLVM_CGT_PATHAM13E devices: Set
ARM_LLVM_CGT_PATHAM26x devices: Set
ARM_LLVM_CGT_PATHConnectivity devices (CC2755, CC1352, etc.): Set
ARM_LLVM_CGT_PATH
See Environment Variables for complete device-specific setup instructions.
After setting environment variables for your target device, run the hello world example:
# Clone just the examples
git clone --depth 1 https://github.com/TexasInstruments/tinyml-tensorlab.git
cd tinyml-tensorlab/tinyml-modelzoo
# Run the example (trains and compiles for the device specified in config.yaml)
python -m tinyml_modelmaker examples/generic_timeseries_classification/config.yaml
Output will be saved to ../tinyml-modelmaker/data/projects/.
2.2.3. Verifying Installation
Verify the installation by importing the packages and checking versions:
import tinyml_modelmaker
import tinyml_tinyverse
import tinyml_torchmodelopt
import tinyml_modelzoo
print(f"TI Tiny ML ModelMaker: {tinyml_modelmaker.__version__}")
print(f"TI Tiny ML Tinyverse: {tinyml_tinyverse.__version__}")
print(f"TI Tiny ML Model Optimization toolkit: {tinyml_torchmodelopt.__version__}")
print(f"TI Tiny ML Model Zoo: {tinyml_modelzoo.__version__}")
If all packages import without errors and versions are displayed, your installation is complete.
2.2.4. Updating
To update to the latest version:
pip install --upgrade git+https://github.com/TexasInstruments/tinyml-tensorlab.git@main#subdirectory=tinyml-modelmaker
2.2.5. Uninstalling
To remove Tiny ML Tensorlab:
pip uninstall tinyml-modelmaker tinyml-tinyverse tinyml-modelzoo tinyml-torchmodelopt
2.2.6. Limitations of User Install
The pip install method has some limitations:
Cannot modify model architectures
Cannot add custom feature extractors
Cannot debug training scripts
Updates require reinstallation
For full access, use Developer Installation.
2.2.7. Troubleshooting
“No module named tinyml_modelmaker”
Ensure you’re using the correct Python environment:
which python # Should point to your Python 3.10 installation
python --version # Should show 3.10.x
Version conflicts
If you have dependency conflicts, try installing in a virtual environment:
python -m venv tensorlab_env
source tensorlab_env/bin/activate # Linux
# or: tensorlab_env\Scripts\activate # Windows
pip install git+https://github.com/TexasInstruments/tinyml-tensorlab.git@main#subdirectory=tinyml-modelmaker
2.2.8. Next Steps
Quickstart - Train your first model
Environment Variables - Configure compilation tools
Developer Installation - Full installation for customization