Run

The Run resource represents the lifecycle of a one-off run. One-off pipeline training runs can be configured using this resource as follows:

apiVersion: pipelines.kubeflow.org/v1alpha5
kind: Run
metadata:
  generateName: penguin-pipeline-run-
spec:
  pipeline: penguin-pipeline:v1-abcdef
  experimentName: penguin-experiment
  runtimeParameters:
  - name: TRAINING_RUNS
    value: '100'
  - name: EXAMPLES
    valueFrom:
      runConfigurationRef:
        name: penguin-pipeline-example-generator-runconfiguration
        outputArtifact: examples
  artifacts:
  - name: serving-model
    path: 'Pusher:pushed_model:0[pushed == 1]'

Note the usage of metadata.generateName which tells Kubernetes to generate a new name based on the given prefix for every new resource.

Fields

NameDescription
spec.pipelineThe identifier of the corresponding pipeline resource to run. If no version is specified, then the RunConfiguration will use the latest version of the specified pipeline.
spec.experimentNameThe name of the corresponding experiment resource (optional - the Default Experiment as defined in the Installation and Configuration section of the documentation will be used if no experimentName is provided).
spec.runtimeParameters[]Runtime parameters for the pipeline training run. See below for more information.
spec.run.artifacts[]Exposed output artifacts that will be included in run completion event when this run has succeeded. See below for more information.

Runtime Parameter Definition

A pipeline run can be parameterised using RunTimeParameters.

NameDescription
nameThe name of the runtime parameter as referenced by the pipeline.
valueThe value of the runtime parameter.
valueFrom.runConfigurationRefIf set, the value of this runtime parameter will be resolved from the output artifacts of the referenced runconfiguration and updated on change.
valueFrom.runConfigurationRef.nameThe name of the runconfiguration to resolve.
valueFrom.runConfigurationRef.outputArtifactThe name of the outputArtifact to resolve.

Note: either value or valueFrom must be defined.

Run Artifact Definition

A pipeline run can expose what Artifacts to include in resulting run completion events.

NameDescription
nameThe name to be used in run completion events or references to identify this artifact.
pathPath of the artifact in the pipeline graph. See below for the syntax

Artifact path Syntax: <COMPONENT>:<OUTPUT>:<INDEX>[<FILTER>] with the following parts:

PartDescriptionExample
COMPONENTThe Pipeline component that produces the artifactsPusher
OUTPUTThe output artifact name of the componentpushed_model
INDEXThe artifact index, defaults to 0 as in most cases there will be only one artifact0
FILTERA boolean expression to apply to properties of the artifact, defaults to no filterpushed == 1

Lifecycle

The KFP-Operator tracks the completion of the created run in the CompletionState of the resource’s status. The operator will clean up completed runs automatically based on the configured TTL. See Configuration for more information.