ContainerOp alternative
See original GitHub issuePer request of @Bobgy:
Currently, when using ContainerOp
you will get the following warning:
FutureWarning: Please create reusable components instead of constructing ContainerOp instances directly. Reusable components are shareable, portable and have compatibility and support guarantees. Please see the documentation: https://www.kubeflow.org/docs/pipelines/sdk/component-development/#writing-your-component-definition-file The components can be created manually (or, in case of python, using kfp.components.create_component_from_func or func_to_container_op) and then loaded using kfp.components.load_component_from_file, load_component_from_uri or load_component_from_text: https://kubeflow-pipelines.readthedocs.io/en/latest/source/kfp.components.html#kfp.components.load_component_from_file
category=FutureWarning,
The alternatives requires you to specify your ContainerOp
instance as either yaml
or json
if you want to use it inline. This option however lacks the editor/type checking support that you would get when using the Python based ContainerOp
.
Proposals:
- Offer a Python based alternative for defining your
ContainerOp
instance in a future proof way - Yaml schema’s could offer editor support for the content of the definition, however it will probably be less convinient than native Python code.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:7
- Comments:11 (5 by maintainers)
Top Results From Across the Web
Chapter 4. Kubeflow Pipelines - O'Reilly
Now let's sequence the ContainerOp(s) (there is only one) into a pipeline. ... Currently, the Kubeflow community is actively looking at alternative ......
Read more >Introduction to the Pipelines SDK - Kubeflow
ContainerOp s can mount a PipelineVolume either via the constructor's argument pvolumes or add_pvolumes() method. kfp.dsl.
Read more >10 Top Kubernetes Alternatives (And Should You Switch?)
While CloudZero is not an alternative to Kubernetes, or even a container management tool, it helps you understand and optimize your K8s ...
Read more >"ContainerOp(...).set_retry(...)" using kfp on Vertex AI managed ...
If applicable, reasons why alternative solutions are not sufficient: In case of any internal errors, the pipeline fails, whereas this same pipeline with ......
Read more >Pipelines for production ML systems - LinkedIn
... the ContainerOp method. The alternative to that will be to put the metadata in a YAML file. ... ContainerOp( name='Train XGBoost model', ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
In our case, we are coming from a “legacy” environment where we have all our pipeline code in a large container, so unfortunately we are not lightweight anymore.
We are not using Notebooks at the moment, so I cannot judge how that would work. However, when you have pylint/mypy check your code for type safety it helps if also your
ContainerOp
definitions can be checked as well.It is validated when you load them, but having validation/autocomplete while you are writing specs is very helpful
I guess this is close to what could work. If I take the (a reduced) example from the link @Bobgy posted, I can identify a case however that would be caught by my editor tooling with the
ContainerOp
route:vs
My editor tooling would find that
inpt1
doesn’t existThere are also lightweight python components created using
kfp.components.create_component_from_func
.Can you describe the problems you’re seeing? The loaded components are represented as strongly typed functions. When working in a Jupyter environment, the editor shows the help for the parameters and
help(op)
works as well. Does this work for you?Can you please help me understand this request. ComponentSpec has a schema and also when you load a component from URL, file or inline text, the component structure is validated. Is there something missing?
It’s possible to construct an instance of the
kfp.components.structures.ComponentsSpec
class and then.save
it. I’m not sure this is more convenient than lightweight python components or manualcomponent.yaml
authoring. I’d like to hear your thoughts.