Notebook Examples Guide¶
To run an MLTK example or tutorial notebook in VSCode:
Select a Python Interpreter
This can be any supported Python Interpreter (Python3.7, 3.8, or 3.9), however, it’s recommended to create a Python “virtual environment” for installing the MLTK.
See the Installation Guide for more details.
To select the Python Interpreter open the VSCode “Command Palette” (
Ctrl+Shift+P), and enter: Python: Select Interpreter
Then find/enter the path to the Python executable you want to use.
Open an MLTK example or tutorial (file extension
.ipynb) in VSCode
Press the Select Kernel button on the upper-right and select the Python Interpreter from step 2
Run an executable cell in the Notebook
The first time you run a cell, you may be prompted to Install ipykernel Click “Install” to install the package.
You should now be able to fully execute the examples and tutorials from the VSCode notebook environment
Google Colab is a free service provided by Google that allows for leveraging the Google cloud servers and GPUs for training your model.
NOTE: When running on Colab, the MLTK executes on the remote Google servers. As such, some commands that require local access are not supported.
To run an MLTK example or tutorial in Colab:
Create a Google Account (if necessary)
Go to the Google Signup page.
NOTE: Click the Use my current email address instead button to use your existing email instead of creating a gmail email address.
Select the example or tutorial you want to run, and click the button at the top of the example or tutorial
At this point, you should be able to execute the example or tutorial on Colab
NOTE: Be sure to first install the MLTK via pip
!pip install silabs-mltk, all the examples/tutorials have this code at the top
NOTE: When training a model a Google Colab, be sure to first select the GPU hardware accelerator: