ABEJA Training documentation (abeja.training)

ABEJA training library is SDK for python, which allows developers to create, get and delete training related resources.

High level API

High-level API is used through following classes.

Usage

from abeja.training import Client, job_status

client = Client()
adapter = client.job_definitions()
definition = adapter.get('flower-classification')

for job in definition.jobs().list():
   if job.status == job_status.COMPLETE:
      print('Job {} was completed!', job.job_id)

Low level API

Low-Level API directly accesses the API endpoint.

Usage

from abeja.training import APIClient

api = APIClient()
job_definitions = api.get_training_job_definitions(organization_id)

API Mapping

method

path

post

/organizations/<organization_id>/training/definitions

APIClient.create_training_job_definition()

get

/organizations/<organization_id>/training/definitions

APIClient.get_training_job_definitions()

get

/organizations/<organization_id>/training/definitions/<job_definition_name>

APIClient.get_training_job_definition()

post

/organizations/<organization_id>/training/definitions/<job_definition_name>/archive

APIClient.archive_training_job_definition()

post

/organizations/<organization_id>/training/definitions/<job_definition_name>/unarchive

APIClient.unarchive_training_job_definition()

delete

/organizations/<organization_id>/training/definitions/<job_definition_name>

APIClient.delete_training_job_definition()

post

/organizations/<organization_id>/training/definitions/<job_definition_name>/versions

APIClient.create_training_job_definition_version()

get

/organizations/<organization_id>/training/definitions/<job_definition_name>/versions

APIClient.get_training_job_definition_versions()

get

/organizations/<organization_id>/training/definitions/<job_definition_name>/versions/<version_id>

APIClient.get_training_job_definition_version()

patch

/organizations/<organization_id>/training/definitions/<job_definition_name>/versions/<version_id>

APIClient.patch_training_job_definition_version()

delete

/organizations/<organization_id>/training/definitions/<job_definition_name>/versions/<version_id>

APIClient.delete_training_job_definition_version()

post

/organizations/<organization_id>/training/definitions/<job_definition_name>/versions/<version_id>/jobs

APIClient.create_training_job()

get

/organizations/<organization_id>/training/definitions/<job_definition_name>/jobs

APIClient.get_training_jobs()

get

/organizations/<organization_id>/training/definitions/<job_definition_name>/jobs/<training_job_id>

APIClient.get_training_job()

post

/organizations/<organization_id>/training/definitions/<job_definition_name>/jobs/<training_job_id>/stop

APIClient.stop_training_job()

get

/organizations/<organization_id>/training/definitions/<job_definition_name>/jobs/<training_job_id>/result

APIClient.get_training_result()

delete

/organizations/<organization_id>/training/definitions/<job_definition_name>/jobs/<training_job_id>/statistics

APIClient.update_statistics()

get

/organizations/<organization_id>/training/definitions/<job_definition_name>/models

APIClient.get_training_models()

post

/organizations/<organization_id>/training/definitions/<job_definition_name>/models

APIClient.create_training_model()

get

/organizations/<organization_id>/training/definitions/<job_definition_name>/models/<model_id>

APIClient.get_training_model()

patch

/organizations/<organization_id>/training/definitions/<job_definition_name>/models/<model_id>

APIClient.patch_training_model()

get

/organizations/<organization_id>/training/definitions/<job_definition_name>/models/<model_id>/download

APIClient.download_training_model()

post

/organizations/<organization_id>/training/definitions/<job_definition_name>/models/<model_id>/archive

APIClient.archive_training_model()

post

/organizations/<organization_id>/training/definitions/<job_definition_name>/models/<model_id>/unarchive

APIClient.unarchive_training_model()

Tutorial