Skip to content
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

Add option in DSL compiler to output YAML #834

Closed
swiftdiaries opened this issue Feb 19, 2019 · 10 comments
Closed

Add option in DSL compiler to output YAML #834

swiftdiaries opened this issue Feb 19, 2019 · 10 comments

Comments

@swiftdiaries
Copy link
Member

It would be nice to have the generated YAML output in addition to the tarball.
Then we could use the Pipeline CLI to run the Workflow all from the CLI.

Local iteration step would be:
Write Pipeline using DSL -> compile to YAML -> Use Pipeline CLI to run -> Use Pipeline to show run link in UI.

Currently, we can do this via the notebook. We can create a Pipeline and run a Pipeline from the notebook and it creates a run link that the user can click on to view the Workflow status.
It'd be nice to have a similar experience from the CLI.

Current DSL compile step:

import kfp.compiler as compiler
compiler.Compiler().compile(basic_pipeline, __file__+'.tar.gz')

Expected DSL compile step:

import kfp.compiler as compiler
compiler.Compiler().compile(bolts_data_fetch_pipeline, __file__+'.yaml')

This shouldn't be that hard to implement because the DSL compiler currently generates the YAML for the Workflow and then bundles it into a tarball: Code.

@vicaire
Copy link
Contributor

vicaire commented Feb 21, 2019

Hi @gaoning777, I thought this was already available. Could you please comment.

@gaoning777
Copy link
Contributor

Current tarball only contains one yaml file, you could simply untar it.

@vicaire
Copy link
Contributor

vicaire commented Feb 22, 2019

@gaoning777, is there any disadvantage in supporting this? It seems that it could be a very common request.

@swiftdiaries, if @gaoning777 does not have any objection, feel free to contribute.

/cc @IronPan

@swiftdiaries
Copy link
Member Author

@gaoning777 That is how I'm doing it right now, it feels like a long-winded approach. And also it would be good to gain some visibility into what exactly is going to be run.

@vicaire Thank you for the reply. I'll wait on @gaoning777 's suggestion before proceeding

@gaoning777
Copy link
Contributor

Could we change the CLI to accept the tar ball instead of the yaml? The motivation of the DSL compiler to generate the tar ball file instead of a yaml was to hide the yaml details and also potentially the pipeline might need to add more files in the future as the intermediate yaml.
On the other hand, we do need to keep the interfaces of the DSL compiler output consistent with the CLI input.

@swiftdiaries
Copy link
Member Author

Makes sense. I'll add a subcommand ml pipeline run <tarball>

@gaoning777
Copy link
Contributor

Thanks

@Ark-kun
Copy link
Contributor

Ark-kun commented Mar 15, 2019

Having an option to output .yaml will help some debugging cases and simplify some tests.

@swiftdiaries
Copy link
Member Author

+1
@gaoning777 Would it make sense to have it as optional? So that only when end-users want a YAML file, the DSL gives them one

@gaoning777
Copy link
Contributor

#855

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants