Configuration
There are various ways to configure and personalize your SuperAlign instance to better suit your needs. In this section you will find all the information you need about settings and options you can configure to get what you need out of SuperAlign.
Initialization
- Run
pureml init
command to setup the puremlconfig.yml file. - Since you want to self-host, enter
Y
in CLI promt asking you whether you want to continue self-hosting or not. - Give the self-hosted backend and frontend url.
If no changes are made to ports or domains (using localhost) then go ahead and click ‘enter’ to use the default values.
Create account
If you’re new to SuperAlign, you’ll need to sign up for an account before you can start using the platform. CLI supports you to signup. You can do this using the pureml
command line utility:
This command will prompt you to enter your email, user handle, name, and password to create your SuperAlign account. Once you register your details successfully, you will receive a verification mail on registered email Id to verify and proceed for login.
Sign In to continue
If you already have a SuperAlign account, you can log in using below method:
The pureml
command line utility:
This command will prompt you to SuperAlign UI. Add your sign in credentials and you should see successful login on entering correct credentials.
Go to https://app.superalign.ai/auth/sign-in
to sign in through your sign in
credentials.
Once you’re logged in, you’ll be able to view your datasets, models, and other assets using the SuperAlign platform.
Using API Token
Go to API Token section in user account settings page on SuperAlign UI here (or using your self-hosted URL if any).
Create a new API Token. Copy the API Secret and save them somewhere safe. The API secret will never be shown again.
Go to your organization settings page to get your organization id. This will be useful in the next step.
While using the SDK after importing use the login function to login using API Token as below:
import pureml
pureml.login(org_id="ENTER_YOUR_ORG_ID", api_key="ENTER_API_KEY")
Usage
You can use your local self-hosted backend in the sdk by using the set_backend
function
Example:
Assuming your backend url is localhost:8080/api
import pureml
# Call this function near the initialization of your scripts, preferably just after importing
pureml.set_backend("http://localhost:8080/api/") # trainling slash at the end is important
...
Additional configuration
Frontend environment
Variable | Description | Default Value |
---|---|---|
BACKEND_URL | backend url env to connect frontend | http://localhost:8080/api/ |
Backend environment
There are multiple environment variables that can be configured externally. But the application also depends upon the configuration of the docker image used to build the compose.
For backend, Currently only base image is officially supported. There will be S3, R2, etc. configured images soon which can be used in the compose to setup object storage or other settings configuration
For Base Configuration :
Rows with a missing ‘Default Value’ usually default to an empty string. This is different from None
.
Variable | Description | Default Value |
---|---|---|
PORT | port where backend will be deployed | 8080 |
DATABASE | type of database which will be used. Currently supported sqlite3 & postgres | sqlite3 |
DATABASE_URL | url for the database (❗Required if database type is postgres) | |
CGO_ENABLED | whether to use cgo (requires gcc) or pure go | 1 |
PURE_SITE_BASE_URL | frontend url for email redirections |