Jobs

Get all jobs

jobs = client.get_jobs(
    application_id="", 
    states=[JobStatus.WAITING, 
            JobStatus.STARTED,
            JobStatus.FINISHED,
            JobStatus.ERROR
    ],
    job_types=[JobType.TRAINING]
)
ParameterTypeDescription
application_idstrOnly return jobs for this application id
statesList[JobStatus]Only return jobs for the listed job states
job_typesList[JobType]Only return jobs for the listed job types

Create a job

Create a training job:

my_job = Job(
    name= "Train a new model for cats and dogs",
    description= "",
    job_type= JobType.TRAINING,
    application_id= "acf26cf4-e19f-425e-b5cb-031830a46df4", # See Applications to get the correct application_id for your job
    dataset_id= "8037b73a-5512-4a45-89e2-29761771fff6", # Update to your dataset_id
    dataset_version_id= "1d3bf8d6-e39b-498e-9c08-680d2f8a3c47", # Update to your dataset_version_id
    items= [
        JobItem(
            name= "image_size",
            value= "224",
            value_type= ValueType.NUMBER,
            label= "Image Size"
        ),
        JobItem(
            name= "arch",
            value= "resnet50",
            value_type= ValueType.TEXT,
            label= "Architecture"
        ),
        JobItem(
            name= "batch_size",
            value= "50",
            value_type= ValueType.NUMBER,
            label= "Batch size"
        )
    ]
)

my_job = client.create_job(my_job)
ParameterTypeDescription
jobJobThe entire Job entity

Job properties in detail.

PropertyTypeDescription
idstrUnique id for the application
namestrName of your job
descriptionstrDescribe the job you are running
job_typeJobTypeThe type of job: TRAINING, VALIDATION, CONVERSION.
application_idstrThe application id of the job. (see applications
statusJobStatusThe status of your job: WAITING, STARTED, FINISHED, ERROR.
status_messagestrMore information about the status of your job; gets updated by the agent handling the job.
user_idstrThe id of the user that requested the job.
cpu_start_timestrThe CPU compute starting time.
cpu_end_timestrThe CPU compute end time.
gpu_start_timestrThe GPU compute starting time.
gpu_end_timestrThe GPU compute end time.
agent_namestrThe agent responsible for handling the job.
dataset_idstrThe id of the dataset being used.
dataset_version_idstrThe id of the dataset version being used.
model_idstrThe id of the model the finished job will be added to. If left blank upon job creation, a new model will be created, and its id will be updated in this property.
model_version_idstrThe id of the model version the job resulted in. Leave blank upon job creation. The property will/should be updated after uploading the model.
start_model_idstrThe model id used to continue training from. (requires continual_training support in the specified application_id)
start_model_version_idstrThe model version id used to continue training from. (requires continual_training support in the specified application_id)
created_atstrThe creation date
updated_atstrLast updated date
itemsList[JobItem]A list of job specific steps and settings.

JobItem in more detail:

PropertyTypeDescription
idstrUnique id for the job item
namestrName of your job
descriptionstrDescribe the job you are running
job_idstrThe job id it belongs to
valuestrThe item value
default_valuestrThe item default value
value_typeValueTypeThe type of the item value: INT, FLOAT, TEXT, MULTI, BOOL, STRING_ARRAY
labelstrThe label for the item
created_atstrThe creation date
updated_atstrLast updated date
ParameterTypeDescription
jobJobThe full job object

Supported job items per applications

Every job can be configured depending on the AI application you are using. Below we list all the possibilties per AI application:

Get a job

my_job = client.get_job(my_job.id)
ParameterTypeDescription
job_idstrThe job id

Update a job

my_job.description = "Update any property"

my_job = client.update_job(my_job)
ParameterTypeDescription
jobJobThe entire job object

Delete a job

client.delete_job(my_job.id)
ParameterTypeDescription
job_idstrThe job id