Note
While using TrueFoundry python SDKtype is not a required field in any of the imported classesJob
Description
Describes the configuration for the jobSchema
Properties
| Name | Type | Required | Description |
|---|---|---|---|
| type | string | true | +value=job |
| name | string | true | Name of the job |
| image | object | true | Specify whether you want to deploy a Docker image or build and deploy from source code |
| trigger | object | true | Specify the trigger |
| params | [Param] | false | Configure params and pass it to create different job runs |
| env | object¦null | false | Configure environment variables to be injected in the service.Docs |
| resources | Resources | false | Describes the resource constraints for the application so that it can be deployed accordingly on the cluster To learn more you can go here |
| retries | integer | true | Specify the maximum number of attempts to retry a job before it is marked as failed. |
| timeout | integer | false | Job timeout in seconds. |
| concurrency_limit | integer | false | Number of runs that can run concurrently |
| service_account | string | false | Service account that this workload should use |
| mounts | [object] | false | Configure data to be mounted to job pod(s) |
| labels | object | false | Add labels to service metadata |
Examples
Triggers
The modules below help configure the Triggers for the JobManual
Description
Describes that we are going to manually trigger our job.Schema
Properties
| Name | Type | Required | Description |
|---|---|---|---|
| type | string | true | +value=manual |
Schedule
Description
Describes that we are going to schedule our job to run at a schedule, making our job a cron job.Schema
Properties
| Name | Type | Required | Description |
|---|---|---|---|
| type | string | true | +value=scheduled |
| schedule | string | true | Specify the schedule for this job to be run periodically in cron format.Learn more |
| concurrency_policy | string | true | Choose whether to allow this job to run while another instance of the job is running, or to replace the currently running instance. Allow will enable multiple instances of this job to run. Forbid will keep the current instance of the job running and stop a new instance from being run. Replace will terminate any currently running instance of the job and start a new one. |
| timezone | string | false | Timezone against which the cron schedule will be calculated, e.g. “Asia/Tokyo”. Default is machine’s local time. https://docs.truefoundry.com/docs/list-of-supported-timezones |
Enumerate Values
| Property | Value |
|---|---|
| concurrency_policy | Forbid |
| concurrency_policy | Allow |
| concurrency_policy | Replace |
Param
Description
Describes a parameter for configurationSchema
Properties
| Name | Type | Required | Description |
|---|---|---|---|
| name | string | true | Name of the param |
| description | string | false | Description of param |
| default | string | false | Default value or placeholder |
| param_type | string | false | none |
Enumerate Values
| Property | Value |
|---|---|
| param_type | string |
| param_type | ml_repo |