Jobs are used to train machine learning models, process a dataset, build container images, execute generic tasks and can be used to perform a variety of functions from compiling a model to running an ETL operation.

In order to run a job you will need to create a component with a kind: job as a runtime:

kind: component
version: 1.1
  kind: job
    image: my-image
    command: [python,]

The same example in Python.

from polyaxon.schemas import V1Component, V1Job
from polyaxon import k8s

job = V1Job(
    container=k8s.V1Container(image="my-image", command=["python", ""]),

component = V1Component(run=job)


Please check the job specification guide to learn about all details for running jobs in Polyaxon.