GoogleCloudPlatform / automlops

Build MLOps Pipelines in Minutes
Apache License 2.0
143 stars 34 forks source link

[Proposed Change] KFP Outputs #47

Closed msokoloff1 closed 6 months ago

msokoloff1 commented 8 months ago

Currently there is no automated way to add outputs to a component. I wrote up a quick PR to demonstrate the idea. I added logic like this my project and it has been working.

For example, the following is not possible today:

@AutoMLOps.component(
def run_simulation(...) -> NamedTuple("outputs", [("output_1", str), ("output_2", str)]):
   ...

@AutoMLOps.pipeline
def pipeline():   
    result = run_simulation(...)
    validate_simulation(
            output_1=result.outputs["output_1"],
            output_2=result.outputs["output_2"],
        )

You can check out the idea here: https://github.com/GoogleCloudPlatform/automlops/pull/46/files

Should I proceed with adding tests and some cleanup?

msokoloff1 commented 6 months ago

Merged changes in #46