Intro

Welcome to the documentation of Outer RAIL SDK.

Contents of this landing page.

What is RAIL

RAIL stands for: Research and Innovation AI Lab

RAIL is a tool that allows AI practitioners to explore and use AI assets directly in the AI on Demand platform (AIoD). RAIL is developed within the AI4Europe project as one of the core services of the AI on Demand platform.

OuterRail organization

SDK provides two types of interfaces:

  1. Instances - are classes that provide a way to work with individual instances of different parts of RAIL, e. g. individual templates, experiments, runs, datasets

  2. Managers - contain operations that function on multiple instances, such as querying, counting,… Special case that is also handled by managers is creation of new Instances.

Installation

Requirements

Python 3.11+

PIP

The OuterRail package can simply be installed with pip via command:

pip install OuterRail

Manually with wheel

To Be Determined

In code setup

Importing the package

You can import the entire SDK with:

import OuterRail

Alternatively you can import only needed parts with:

from OuterRail import what_you_need

Config and Logging in

For the SDK to work with underlying RAIL backend, you need to specify the URL of the RAIL service. Additionally, most of the functionality requires authentication, and therefore you need to be logged in to use this functionality.

Logging in will require entering a device code on the provided URL, where afterwards you will be log in to the service and give consent to resources needed by the SDK.

The code for this would look something like:

1import os
2from OuterRail import Configuration
3
4config = Configuration(host="https://rail.aiod.eu/api") # 1. Specify URL
5config.login() # 2. Blocking function until log in or timeout
6... your logic here ...
7config.logout() # 3. After your code, logout

Important considerations

Note

Calling login() will block the execution of your code until you either successfully log in or the default 5 minute timeout is reached. After the call you will be provided with url and code, which you need to use to log in to the service and give consent to the resources needed by the SDK.

Note

Successfully created template will need to be approved by an administrator and afterward built as a docker container by the backend service. Only after these operations are done can it be used to make new experiments.

Note

To create an experiment successfully, the template it is based on needs to be approved and built as a docker container.

Reference Table