Jobs
Get all jobs
jobs = client.get_jobs(
application_id="",
states=[JobStatus.WAITING,
JobStatus.STARTED,
JobStatus.FINISHED,
JobStatus.ERROR
],
job_types=[JobType.TRAINING]
)
| Parameter | Type | Description |
|---|
| application_id | str | Only return jobs for this application id |
| states | List[JobStatus] | Only return jobs for the listed job states |
| job_types | List[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)
| Parameter | Type | Description |
|---|
| job | Job | The entire Job entity |
Job properties in detail.
| Property | Type | Description |
|---|
| id | str | Unique id for the application |
| name | str | Name of your job |
| description | str | Describe the job you are running |
| job_type | JobType | The type of job: TRAINING, VALIDATION, CONVERSION. |
| application_id | str | The application id of the job. (see applications |
| status | JobStatus | The status of your job: WAITING, STARTED, FINISHED, ERROR. |
| status_message | str | More information about the status of your job; gets updated by the agent handling the job. |
| user_id | str | The id of the user that requested the job. |
| cpu_start_time | str | The CPU compute starting time. |
| cpu_end_time | str | The CPU compute end time. |
| gpu_start_time | str | The GPU compute starting time. |
| gpu_end_time | str | The GPU compute end time. |
| agent_name | str | The agent responsible for handling the job. |
| dataset_id | str | The id of the dataset being used. |
| dataset_version_id | str | The id of the dataset version being used. |
| model_id | str | The 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_id | str | The 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_id | str | The model id used to continue training from. (requires continual_training support in the specified application_id) |
| start_model_version_id | str | The model version id used to continue training from. (requires continual_training support in the specified application_id) |
| created_at | str | The creation date |
| updated_at | str | Last updated date |
| items | List[JobItem] | A list of job specific steps and settings. |
JobItem in more detail:
| Property | Type | Description |
|---|
| id | str | Unique id for the job item |
| name | str | Name of your job |
| description | str | Describe the job you are running |
| job_id | str | The job id it belongs to |
| value | str | The item value |
| default_value | str | The item default value |
| value_type | ValueType | The type of the item value: INT, FLOAT, TEXT, MULTI, BOOL, STRING_ARRAY |
| label | str | The label for the item |
| created_at | str | The creation date |
| updated_at | str | Last updated date |
| Parameter | Type | Description |
|---|
| job | Job | The 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)
| Parameter | Type | Description |
|---|
| job_id | str | The job id |
Update a job
my_job.description = "Update any property"
my_job = client.update_job(my_job)
| Parameter | Type | Description |
|---|
| job | Job | The entire job object |
Delete a job
client.delete_job(my_job.id)
| Parameter | Type | Description |
|---|
| job_id | str | The job id |