-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Question About Dsl.ContainerOp Deprecation #4644
Comments
/assign @Ark-kun |
/kind question |
Note that only the ContainerOp constructor is being deprecated.
Thank you for reporting this. We'll investigate.
I wonder whether this is the case. The component.yaml format was designed to be as minimal as possible. This component does not look bigger than your example. And the conversion seems straightforward. name: GCS - Download
inputs:
- {name: Url}
outputs:
- {name: Data}
implementation:
container:
image: 'google/cloud-sdk:279.0.0'
command: ['gsutil', 'cp', {inputValue: Url}, {outputPath: Data}] When actively developing command-line components I usually inline them like this: gcs_download_op = load_component_from_text('''
name: GCS - Download
inputs:
- {name: Url}
outputs:
- {name: Data}
implementation:
container:
image: 'google/cloud-sdk:279.0.0'
command: ['gsutil', 'cp', {inputValue: Url}, {outputPath: Data}]
''')
I'd be interested in seeing a small PoC. There are several problems involved, mostly related to inferring inputs and outputs. |
Thank you for your detailed explanation.
Under the proposed wrapper I was going to hardcode the commands without any support for specifying outputs or inputs.
This proposed wrapper would have had the exact same limitations as the ContainerOp constructor. Using component.yaml seem to be the way forward. |
I have sent in #4658 for making the deprecation visible to end-users. |
Deprecation
I see that dsl.ContainerOp is being deprecated in favor of reusable components.
I would also like to point out that the Deprecation is not really visible. When you use it to create a pipeline. You can try out one compiling one of the pipelines using dsl.ContainerOp. No there would be no warnings thrown.
Usecase
I find components like the following really useful !
pipelines/samples/core/exit_handler/exit_handler.py
Lines 21 to 30 in dde7f9a
Alternatives
Solutions
I have thought of an alternative, which involves using a python function and generating the text for
component.yaml
and then load_component_from_text. I would happy to contribute this in. Do let me know your thoughts.The text was updated successfully, but these errors were encountered: