Quick Start (Model Developers)¶
As a Model Developer, you can manage models, datasets, train jobs & inference jobs on SINGA-Auto. This guide only highlights the key methods available to manage models.
To learn about how to manage datasets, train jobs & 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>
and SINGA-Auto Web Admin at <singa_auto_host>:<web_admin_port>
.
To learn more about what else you can do on SINGA-Auto, explore the methods of singa_auto.client.Client
Installing the client¶
Install Python 3.6 such that the
python
andpip
point to the correct installation of Python (see Installing Python)Clone the project at https://github.com/nusdbsystem/singa-auto (e.g. with Git)
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) client.login(email='superadmin@singa_auto', password='singa_auto')
See also
singa_auto.client.Client.login()
Creating models¶
To create a model, you’ll need to submit a model class that conforms to the specification
by singa_auto.model.BaseModel
, written in a single Python file.
The model’s implementation should conform to a specific task (see tasks).
Refer to the parameters of singa_auto.client.Client.create_model()
for configuring how your model runs on SINGA-Auto,
and refer to Model Development Guide to understand more about how to write & test models for SINGA-Auto.
Example:
client.create_model( name='TfFeedForward', task='IMAGE_CLASSIFICATION', model_file_path='examples/models/image_classification/TfFeedForward.py', model_class='TfFeedForward', dependencies={ 'tensorflow': '1.12.0' } ) client.create_model( name='SkDt', task='IMAGE_CLASSIFICATION', model_file_path='examples/models/image_classification/SkDt.py', model_class='SkDt', dependencies={ 'scikit-learn': '0.20.0' } )
See also
singa_auto.client.Client.create_model()
Listing available models by task¶
Example:
client.get_available_models(task='IMAGE_CLASSIFICATION') # While leave the "task" unspecified, the method will retrieve information of all uploaded models client.get_available_models()Output:
[{'access_right': 'PRIVATE', 'datetime_created': 'Mon, 17 Dec 2018 07:06:03 GMT', 'dependencies': {'tensorflow': '1.12.0'}, 'id': '45df3f34-53d7-4fb8-a7c2-55391ea10030', 'name': 'TfFeedForward', 'task': 'IMAGE_CLASSIFICATION', 'user_id': 'fb5671f1-c673-40e7-b53a-9208eb1ccc50'}, {'access_right': 'PRIVATE', 'datetime_created': 'Mon, 17 Dec 2018 07:06:03 GMT', 'dependencies': {'scikit-learn': '0.20.0'}, 'id': 'd0ea96ce-478b-4167-8a84-eb36ae631235', 'name': 'SkDt', 'task': 'IMAGE_CLASSIFICATION', 'user_id': 'fb5671f1-c673-40e7-b53a-9208eb1ccc50'}]
See also
singa_auto.client.Client.get_available_models()
Deleting a model¶
Example:
client.delete_model('fb5671f1-c673-40e7-b53a-9208eb1ccc50')
See also
singa_auto.client.Client.delete_model()