-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat(sdk): update PipelineConfig to reflect new workspace Protobuf changes #11934
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
feat(sdk): update PipelineConfig to reflect new workspace Protobuf changes #11934
Conversation
Skipping CI for Draft Pull Request. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
cfc2a88
to
ecd09b8
Compare
@VaniHaripriya I think the tests will fail until |
@VaniHaripriya you'll need to update |
ecd09b8
to
b0941f6
Compare
Thank you @mprahl , updated the pipeline_config and added a test. |
9c780f9
to
3c4dfd2
Compare
@@ -13,11 +13,35 @@ | |||
# limitations under the License. | |||
"""Pipeline-level config options.""" | |||
|
|||
from typing import Any, Dict, Optional | |||
|
|||
class KubernetesWorkspaceConfig: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you make these classes importable from kfp.dsl
(e.g. from kfp.dsl import KubernetesWorkspaceConfig
) just like PipelineConfig
? See sdk/python/kfp/dsl/__init__.py
for the PipelineConfig
example.
# {'pipelineConfig': { | ||
# '<some pipeline config option>': pipelineConfig.<get that value>, | ||
# }}, platformSpec.platforms['kubernetes']) | ||
workspace = pipelineConfig.workspace |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you need to guard against pipelineConfig.workspace
being None
/not set below?
class WorkspaceConfig: | ||
"""Configuration for a shared workspace that persists during the pipeline run.""" | ||
|
||
def __init__(self, size: str = "", kubernetes: Optional[KubernetesWorkspaceConfig] = None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please add documentation for the expected size format?
class WorkspaceConfig: | ||
"""Configuration for a shared workspace that persists during the pipeline run.""" | ||
|
||
def __init__(self, size: str = "", kubernetes: Optional[KubernetesWorkspaceConfig] = None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should make size
required.
def __init__(self, size: str = "", kubernetes: Optional[KubernetesWorkspaceConfig] = None): | |
def __init__(self, size: str, kubernetes: Optional[KubernetesWorkspaceConfig] = None): |
3c4dfd2
to
6165e1f
Compare
20bedd5
to
2069008
Compare
…anges Signed-off-by: VaniHaripriya <[email protected]>
2069008
to
8f89824
Compare
Description of your changes:
This PR updates the dsl.PipelineConfig class to support configuring a pipeline workspace using the newly introduced WorkspaceConfig and KubernetesWorkspaceConfig message types in pipeline_spec.proto
Checklist: