Jobs
Data types for job execution, status tracking, and agent assignment.
info
All data types support standard serialization methods (to_json, from_json, to_dict, from_dict, to_str) which are omitted from the tables below.
Job
Represents a job that runs a function on a model and produces a file result.
Attributes:
| Name | Type | Description |
|---|---|---|
| id | str | |
| created | datetime.datetime | |
| file | File | |
| comments | List[Comment] | |
| archive_status_history | List[ResourceArchiveStatus] | |
| created_by_id | str | |
| function | FunctionVersion | |
| assigned_agent_id | Optional[str] | |
| agent_id | Optional[str] | |
| tenant_id | Optional[str] | |
| model_id | Optional[str] | |
| status_history | Optional[List[JobStatus]] |
Methods:
| Name | Description |
|---|---|
| poll_job | Poll the job until it reaches a terminal state. |
| update_properties | Update one or more metadata fields on the underlying file. |
| update_description | Update the file’s description. |
| update_display_name | Update the file’s display name. |
| update_external_identifier | Update the file’s external identifier. |
| update_version_name | Update the file’s version name. |
| read_bytes | Read and return the raw byte contents of the associated file revision. |
| read_text | Read the contents as decoded text. |
| copy_to | Copy the contents to a local file. |
| read_json | Parse the contents as JSON. |
| cleanup_cache | Clean up cached files if they exist. |
| get_cache_stats | Get filesystem cache statistics. |
| create_access | Create a new access relationship for a subject by ID. |
| create_access_by_email | Create a new access relationship for a subject by email. |
| update_access | Update an existing access relationship for a subject. |
| remove_access | Remove an existing access relationship. |
| list_access | List all access relationships for this resource. |
| archive | Archive the current item using the client’s archive method for this resource type. |
| restore | Restore the current item using the client’s restore method for this resource type. |
JobStatus
Represents a status update for a job.
Attributes:
| Name | Type | Description |
|---|---|---|
| id | str | |
| created | datetime.datetime | |
| job_id | str | |
| name | JobStatusName | |
| created_by_id | Optional[str] | |
| message | Optional[str] | |
| agent_id | Optional[str] |
JobStatusName
Attributes:
| Name | Type | Description |
|---|---|---|
| CREATED | — | |
| PENDING | — | |
| CLAIMED | — | |
| VALIDATING | — | |
| RUNNING | — | |
| UPLOADING | — | |
| COMPLETED | — | |
| FAILED | — | |
| CANCELED | — | |
| UNKNOWN | — |
JobStatusMessage
Attributes:
| Name | Type | Description |
|---|---|---|
| message | str |
NewJobAssignedAgent
Attributes:
| Name | Type | Description |
|---|---|---|
| agent_id | str |
NoJobResponse
Attributes:
| Name | Type | Description |
|---|---|---|
| message | str |
ResponseGetJobForAgent
Attributes:
| Name | Type | Description |
|---|---|---|
| anyof_schema_1_validator | Optional[Job] | |
| anyof_schema_2_validator | Optional[NoJobResponse] | |
| actual_instance | Optional[Union[Job, NoJobResponse]] | |
| any_of_schemas | Set[str] |
Methods:
| Name | Description |
|---|---|
| actual_instance_must_validate_anyof |
NoOpResponse
Attributes:
| Name | Type | Description |
|---|---|---|
| status | str | |
| message | str |
PageJob
A paginated response object for listing jobs.