There are various ways to configure and personalize your PureML 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 PureML.

Initialization

  1. Run pureml init command to setup the puremlconfig.yml file.
  2. Since you want to self-host, enter Y in CLI promt asking you whether you want to continue self-hosting or not.
  3. 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 PureML, 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:

pureml auth signup

This command will prompt you to enter your email, user handle, name, and password to create your PureML 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 PureML account, you can log in using below method:

The pureml command line utility:

pureml auth login

This command will prompt you to PureML UI. Add your sign in credentials and you should see successful login on entering correct credentials.

Go to https://pureml.com/auth/signin 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 PureML platform.

Using API Token

Go to API Token section in user account settings page on PureML UI here (or using your self-hosted URL if any).

ListAPIToken

Create a new API Token. Copy the API Secret and save them somewhere safe. The API secret will never be shown again.

CreateAPIToken

Go to your organization settings page to get your organization id. This will be useful in the next step.

  • SDK

  • CLI

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

VariableDescriptionDefault Value
BACKEND_URLbackend url env to connect frontendhttp://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.

VariableDescriptionDefault Value
PORTport where backend will be deployed8080
DATABASEtype of database which will be used. Currently supported sqlite3 & postgressqlite3
DATABASE_URLurl for the database (❗Required if database type is postgres)
CGO_ENABLEDwhether to use cgo (requires gcc) or pure go1
PURE_SITE_BASE_URLfrontend url for email redirections