Environment Setup

Understand the system requirements before using the SDK.

For developers:

To run the integrate.ai SDK samples and models, ensure that your environment is configured properly.

Required software:

To run the sample notebook, you may also need:

Install integrate.ai

Generate an Access Token

To install the client and SDK, you must generate an access token through the integrate.ai web portal.

  1. Log in to your integrate.ai account on the web.

  2. On the Dashboard, click Generate Access Token.

  3. Copy the access token and save it to a secure location.

This is the only time that the API token can be viewed or downloaded. If you lose or forget your API token, you cannot retrieve it. Instead, create a new API token and revoke the old one. You can manage API tokens through the web portal.

Treat your API tokens like passwords and keep them secret. When working with the API, use the token as an environment variable instead of hardcoding it into your programs. In this documentation, the token is referenced as <IAI_TOKEN>.

Install integrate.ai packages

  1. At a command prompt on your machine, run the following command to install the management tool for the SDK and client.

  2. Wait for the installation to complete.

  3. Install the SDK package using the access token you generated.

  4. Install the integrate.ai client using the same access token. The client is a Docker image that runs in a container.

  5. Install the integrate.ai server using the same access token. The server is a Docker image that runs in a container.

# Install packages

pip install integrate-ai

iai sdk install --token <IAI_TOKEN>

iai client pull --token <IAI_TOKEN>

iai server pull --token <IAI_TOKEN>

Optional: If you are building a model for data that includes images or video, follow the steps for Setting up a Docker GPU Environment.

Download the sample notebook

You can download the sample Jupyter notebook from the web portal. Click the link on the dashboard to download it.

You can find additional sample notebooks in integrate.ai's sample repository.

https://github.com/integrateai/integrateai-samples

Download sample data

Download the sample dataset to use with the end user tutorials.

The sample includes four files:

  • test.parquet - test data, to be used when joining a session

  • train_silo0.parquet - training data for dataset 1

  • train_silo1.parquet - training data for dataset 2

  • train_centralized.parquet - all training data in one file

Authenticate with your Access Token

Before you can begin working with the system, you must authenticate to the API client with your access token.

  1. Set an environment variable for your token or replace it inline in the sample code. Reminder: You can generate and manage tokens through the integrate.ai web portal.

  2. Use your access token to authenticate to the API client. The SDK simplifies the authentication process by providing a connect helper module. You import the connect helper from the SDK, provide your token, and authenticate to the client.

import os
IAI_TOKEN = os.environ.get("IAI_TOKEN")

from integrate_ai_sdk.api import connect
client = connect(token=IAI_TOKEN)

Congratulations, setup is now complete!

Review the End User Tutorials and get started with integrate.ai.

Last updated