Categories

Versions

Python Library

Altair RapidMiner provides a Python library on GitHub that allows you to interact with Altair RapidMiner products from Python. You can collaborate with others using the Altair RapidMiner repository, run processes from Python scripts, and leverage the scalable infrastructure of Altair AI Hub.

The rapidminer Python library will be useful in these use-cases:

  • you work locally on the same data in Altair RapidMiner and in Python.
  • you need to reuse business logic that exists in an Altair RapidMiner process in Python.
  • you develop Python code snippets that you may later use in a Altair RapidMiner process. You can access the input data directly from your local Altair RapidMiner repository without any additional export / import step.
  • you are using Python primarily, but want to collaborate with colleagues using the Altair RapidMiner platform. You can easily share any kind of data via the Altair AI Hub repository.
  • you plan to leverage the scalable Altair AI Hub infrastructure directly from Python.
  • you want to call a deployed Real-Time Scoring service directly from Python.

If you are working with Notebooks inside AI Hub, the library is already provisioned to cover most of the use cases mentioned above.

Installation

You can install the library using the Python package manager pip with a simple one-liner:

pip install rapidminer

Usage

For the latest usage examples, refer to the tutorial notebook provided with Notebooks, or explore the examples on GitHub.

Authentication

To connect to Altair AI Hub, you need to provide credentials to authenticate with the server. The following inputs are required:

  • authentication_server: The URL of the Keycloak authentication server, including the /auth postfix.
  • offline_token: After logging into the AI Hub instance with the appropriate permissions, you can retrieve your offline token from the {AI Hub URL}/get-token page.
  • client_secret: The client secret is available on the same page for the token-tool client.

To fully automate the execution, you can provide these credentials along with additional parameters. For more details, please refer to the official documentation.

Here’s a basic example of how to connect to Altair AI Hub:

import rapidminer
connector = rapidminer.Server("https://myserver.mycompany.com:8080",
    authentication_server="https:///myserver.mycompany.com:8081/auth",
    offline_token="qwert12345",
    client_secret="qwert12345")

This example demonstrates how to establish a connection to the server using the necessary authentication details.