Warning

We’re planning to deprecate abeja.train package in the future version. Instead, the abeja.training package contains far more detailed new high-level APIs. Furthermore, these classes provide more consistent and cleaner interface for developers.

ABEJA Training documentation (abeja.train)

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 trough following classes.

Usage

from abeja.train import Client
from abeja.train.statistics import Statistics as ABEJAStatistics

client = Client()

statistics = ABEJAStatistics(num_epochs=10, epoch=1)
statistics.add_stage(name=ABEJAStatistics.STAGE_TRAIN, accuracy=90.0, loss=0.10)
statistics.add_stage(name=ABEJAStatistics.STAGE_VALIDATION, accuracy=75.0, loss=0.07)

client.update_statistics(statistics)

API Mapping

method

path

get

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

Client.download_training_result()

post

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

Client.update_statistics()

Low level API

Low-Level API directly accesses the API endpoint.

Usage

from abeja.train 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()

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()

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()

Tutorial