Quick Start (Admins)

As an Admin, you can manage users, datasets, models, train jobs & inference jobs on SINGA-Auto. This guide only highlights the key methods available to manage users.

To learn about how to manage models, go to Quick Start (Model Developers).

To learn about how to manage train & inference jobs, go to Quick Start (Application Developers).

This guide assumes that you have access to a running instance of SINGA-Auto Admin at <singa_auto_host>:<admin_port>, e.g., 127.0.0.1:3000, and SINGA-Auto Web Admin at <singa_auto_host>:<web_admin_port>, e.g., 127.0.0.1:3001.

Installation

  1. Install Python 3.6 such that the python and pip point to the correct installation of Python (see Installing Python)

  2. Clone the project at https://github.com/nusdbsystem/singa-auto (e.g. with Git)

  3. Within the project’s root folder, install SINGA-Auto’s client-side Python dependencies by running:

    pip install -r ./singa_auto/requirements.txt
    

Initializing the client

Example:

from singa_auto.client import Client
client = Client(admin_host='localhost', admin_port=3000) # 'localhost' can be replaced by '127.0.0.1' or other server address
client.login(email='superadmin@singaauto', password='singa_auto')

See also

singa_auto.client.Client.login()

Creating users

Examples:

client.create_user(
    email='admin@singaauto',
    password='singa_auto',
    user_type='ADMIN'
)

client.create_user(
    email='model_developer@singaauto',
    password='singa_auto',
    user_type='MODEL_DEVELOPER'
)

client.create_user(
    email='app_developer@singaauto',
    password='singa_auto',
    user_type='APP_DEVELOPER'
)

See also

singa_auto.client.Client.create_user()

Listing all users

Example:

client.get_users()
[{'email': 'superadmin@singaauto',
'id': 'c815fa08-ce06-467d-941b-afc27684d092',
'user_type': 'SUPERADMIN'},
{'email': 'admin@singaauto',
'id': 'cb2c0d61-acd3-4b65-a5a7-d78aa5648283',
'user_type': 'ADMIN'},
{'email': 'model_developer@singaauto',
'id': 'bfe58183-9c69-4fbd-a7b3-3fdc267b3290',
'user_type': 'MODEL_DEVELOPER'},
{'email': 'app_developer@singaauto',
'id': '958a7d65-aa1d-437f-858e-8837bb3ecf32',
'user_type': 'APP_DEVELOPER'}]

See also

singa_auto.client.Client.get_users()

Banning a user

Example:

client.ban_user('app_developer@singaauto')

See also

singa_auto.client.Client.ban_user()