⚠️ This template has been created for the purposes of supporting SDK onboarding workshops. It is currently in draft state and will likely be subject to future change. Any questions that arise should be directed to cs@digilab.ai
This section provides an overview of how to access digiLab's Uncertainty Engine via the Software Development Kit (SDK). As an alternative to the Graphical User Interface (GUI), the SDK is designed for users who are comfortable writing in Python and would prefer to use a notebook to interact with the Uncertainty Engine.
The SDK can also offer a number of advantages, including:
- Ease of automated resource integration (i.e., a simple Python script can be written to navigate on-device directories)
- Freedom of bespoke visualisation of Uncertainty Engine outputs
- Efficiency of looping repetitive tasks (e.g., running a model training workflow - varying the model configuration each iteration)
- Traceability of version control, to manage collaborative projects (using git)
Datasets used in workflows executed via the SDK are ultimately stored within a project space as a resource. The workflows themselves (e.g., train classifier) and the product of workflows (e.g., a GP regressor model) can be saved to project spaces via the SDK. This is reflected in the Uncertainty Engine front-end (i.e. the GUI), which can be incredibly useful for showcasing complex workflows to stakeholders with a range of technical proficiency.
This guide will help you get started with the Uncertainty Engine (UE) SDK using a simple template and step-by-step setup instructions. The template is accompanied by a detailed example that utlises some commonly used workflows.
template.ipynb– A simple notebook template to get up and running with the UE SDKsdk_example.ipynb– Example workflows demonstrating commonly used SDK functionality
First, clone this repository to your local machine:
- Click the green “<> Code” button on the repository page
- If you have Git installed, clone the repository into your desired directory
- Otherwise, select “Download ZIP” and extract it to your chosen location
This project uses Poetry for dependency management. Poetry creates and manages an isolated virtual environment for the project, so you don't need to create one manually.
If you don't already have Poetry installed, follow the official installation guide. On Mac/Linux this is typically:
curl -sSL https://install.python-poetry.org | python3 -Verify the installation:
poetry --versionThis project requires Python version >=3.11, <3.13. Make sure a compatible interpreter is installed on your system (e.g. Python 3.11 or 3.12).
-
Open a terminal and navigate to the project folder from the cloned repository.
-
(Optional) Tell Poetry which Python interpreter to use — for example:
poetry env use python3.11
-
Install the project dependencies:
poetry install
Poetry reads pyproject.toml and installs the exact versions recorded in poetry.lock into a dedicated virtual environment (created in a local .venv folder).
You can then either run commands through Poetry:
poetry run jupyter notebookor activate the environment's shell for the session:
# Poetry 2.x
poetry env activate
# then run the printed 'source ...' command, or on older setups:
source .venv/bin/activateWhy use Poetry? It isolates project dependencies and locks their versions, keeping installs reproducible and preventing conflicts with other Python projects on your system.
Finally, open template.ipynb and ensure the Poetry environment (the project's .venv) is selectable as the notebook kernel.
- Create a new file in the project directory called `.env' (or rename the .env.template file - retaining the contents)
- Add the following, along with your UE credentials:
UE_USERNAME=""
UE_PASSWORD=""
- [IF APPLICABLE] Add custom environment details:
cognito_user_pool_client_id=""
core_api=""
region=""
resource_api=""
- Save this file
If you are sharing this repository (e.g. via Git), ensure that .env is included in your .gitignore file to prevent exposing credentials.
You are now ready to run the notebooks in this repository.
- Start with
template.ipynbto get started - Explore
sdk_example.ipynbfor more example workflow creation and execution Once you're comfortable with the SDK, you can remove example notebooks and begin building your own workflows.