Skip to content

Commit

Permalink
Introduces PipelineConfig class with TTL configuration
Browse files Browse the repository at this point in the history
Signed-off-by: Ricardo M. Oliveira <[email protected]>
  • Loading branch information
rimolive committed Nov 6, 2024
1 parent f8973d2 commit 86f1025
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 8 deletions.
24 changes: 18 additions & 6 deletions api/v2alpha1/go/pipelinespec/pipeline_spec.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions api/v2alpha1/pipeline_spec.proto
Original file line number Diff line number Diff line change
Expand Up @@ -1104,4 +1104,5 @@ message PlatformDeploymentConfig {
// Spec for pipeline-level config options. See PipelineConfig DSL class.
message PipelineConfig {
// TODO add pipeline-level configs
int32 pipelineTtl = 1;
}
5 changes: 5 additions & 0 deletions sdk/python/kfp/compiler/pipeline_spec_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -2086,6 +2086,11 @@ def _merge_pipeline_config(pipelineConfig: pipeline_config.PipelineConfig,
# '<some pipeline config option>': pipelineConfig.<get that value>,
# }}, platformSpec.platforms['kubernetes'])

pipeline_config_json = json_format.ParseDict(
{'pipelineConfig': {
'pipelineTtl': pipelineConfig.get_ttl(),
}}, platformSpec.platforms['kubernetes'])

return platformSpec


Expand Down
6 changes: 4 additions & 2 deletions sdk/python/kfp/dsl/pipeline_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
class PipelineConfig:
"""PipelineConfig contains pipeline-level config options."""

def __init__(self):
pass
def __init__(self, ttl=None):
self.ttl, ttl

# TODO add pipeline level configs
def set_pipeline_ttl(self, ttl: int):
self.ttl = ttl

0 comments on commit 86f1025

Please sign in to comment.