Getting Started with Altair AI tools Python Devkit
Quick Start Guide
The Altair AI Tools Python Devkit consists of two major components, i.e.
Python extension loader (PEL): A Java extension that manages the Python extensions in Altair AI platform. The Python Extension Loader is a must to install and use the Python extensions and is available on Altair RapidMiner marketplace to download.
Python devkit package: The altair-aitools-devkit conda Python package to develop and build Python extensions.
Pre-requisites
The first step is getting equipped with all the tools and setup. You would need to do the following things to develop the extension
- Install your favourite IDE like VS Code, PyCharm etc.
- Miniforge or mambaforge.
- Basic knowledge of Python.
To test, debug and use the Python extensions, you need the following.
- Altair AI Studio 10.3.0 or later versions with the Altair Units license.
- Python Extension loader.
Note: The Python Extension Loader comes pre-installed with Altair AI Studio 2025.1.0.
Installation
The first step to develop the Python extension is to create a new conda environment.
- In your terminal, create and activate a new conda environment and install the altair-aitools-devkit package.
conda create -n sample-environment python=3.12
conda activate sample-environment
conda install altair-aitools-devkit -c conda-forge
The altair-aitools-devkit package supports Python version 3.9 and higher.
Create extension
- create a new directory called sample-extension.
- With the conda environment, run the 'create-extension' command
mkdir sample-extension
cd sample-extension
create-extension
- Follow the instruction in the terminal. Hit enter to choose the deafault.
Choose the type of project to create: 'blank' or 'sample' (default: sample):
Enter the extension name (default: samples):
Enter the version number (default: 0.0.1):
Enter the author name:
Extension Name: samples
Version Number: 0.0.1
Author Name:
Creating a sample project...
Sample project created with src folder and HelloWorld script.
- Open the extension folder in your IDE.
The create-extension command creates default directory structure with a sample hello-world file.
Build extension
In your terminal, use the build-extension command from the root directory of the project.
On Windows:
build-extension -o "%USERPROFILE%\.AltairRapidMiner\AI Studio\shared\extensions\python-extensions" .
Note: While copying the above command, make sure to correct the extra newline between "AI Studio" on your terminal.
On MacOS/Linux
build-extension -o "~\.AltairRapidMiner\AI Studio\shared\extensions\python-extensions" .
Note: By default, Python extension .zip files are searched for in ~/.Rapidminer/extensions/python-extensions or ~/.AltairRapidMiner/AI Studio/shared/extensions/python-extensions
The output will show the details of the build
==================================================
INFO: SDK version: 1.0
INFO: Runtime version: 1.0
INFO: Extension: samples
INFO: Version: 0.0.1
INFO: Namespace: pysa
INFO: Module: src
INFO: Environment: sample-environment
INFO: License: None
INFO: List at root level: False
==================================================
INFO: Found 0 dependency in configuration (skipping).
INFO: Found 0 data object definitions in module 'src'.
INFO: Found 1 function definitions in module 'src'.
And, you will find the zip file of the extension in the output directory. The zip file contains the code, extension.json and env.yml file. The next step now is to load the extension in Altair AI Studio.
Run extension
- Start Altair AI Studio.
- After the launch, AI Studio, will check for the Python extension and will perform certain steps to install required Python distribution(miniforge), and setup the environment.
Note: It may take sometime to install the conda/mamba distribution and environment depending on your internet connection.
Check if the Python extension is loaded correctly by clicking Extensions -> About Installed Python Extensions.
If the environment setup was succesful, you should see the hello world operator under the extensions operator in AI Studio.
Create a process with the operator
- Drag the operator to the process canvas and connect the output port. Add the value in the parameter name and hit Run.
the output should be
Congratulations on creating your first operator and extension!
Next Steps
To expand your knowledge and build more advanced extensions:
- Explore the Core Concepts behind the Python SDK architecture.
- Follow our tutorial to create basic operators and advanced operators
- Custom Data Objects for working with complex data structures.
Happy coding with Altair AI Tools Python Devkit!