tfx icon indicating copy to clipboard operation
tfx copied to clipboard

Provide a single command to create_or_update the pipeline in CLI

Open jiyongjung0 opened this issue 4 years ago • 8 comments

System information

  • All
  • Are you willing to contribute it (Yes/No): Yes

Describe the feature and the current behavior/state. Currently pipeline create command can be used when there is no pipeline, and update command can be used when there *is an existing pipeline. It would be better to have just one command that can be used in CI/CD to create/update pipelines.

For example,

tfx pipeline create --overwrite ...

or

tfx pipeline update --missing_ok ...  (We can support --missing_ok for the `delete` command.)

Will this change the current API? How? No.

Who will benefit with this feature? Mostly users with CI/CD flow which doesn't have human intervention.

Do you have a workaround or are completely blocked by this? : We can use pipeline list and examine the output but it is quite cumbersome and need a conditional branch.

jiyongjung0 avatar Mar 17 '21 00:03 jiyongjung0

Hi @jiyongjung0

thanks so much for your efforts on this topic. I prefer tfx pipeline create --overwrite it feels more natural and easier to understand

SaschaHeyer avatar Mar 17 '21 09:03 SaschaHeyer

@SaschaHeyer Thank you for the feedback. May I ask one more thing? Kubeflow Pipelines has a concept of pipeline version, and when we do tfx pipeline update, we actually create a new version of the pipeline instead of deleting existing one. If we delete a pipeline it might not displayed well in Kubeflow Pipelines web UI.

However, overwrite feels like we should delete the existing pipeline to me, but it might not a best fit for repeated CI/CD jobs. Do you think that is it ok to update instead of deleting the existing pipeline?

jiyongjung0 avatar Mar 18 '21 01:03 jiyongjung0

Yes you're right updating make more sense. We should keep the concept of versions

SaschaHeyer avatar Mar 18 '21 05:03 SaschaHeyer

I've had the same issue as Sascha. For my situation, I have a small number of pipelines, each with a large, growing number of versions.

The tfx pipeline update --missing_ok is most appealing for us because we are typically attempting to create a new version in a CICD build context that would not necessarily have the local pipeline_args.json snippet. (As a workaround we run the create step manually, add the initial JSON to the repo, and reuse that in CICD setup by setting KUBEFLOW_HOME.)

ghost avatar Apr 22 '21 01:04 ghost

Hi, I would love to contribute to this, pls let me know soon if it is possible

FatimahAdwan avatar Apr 27 '21 09:04 FatimahAdwan

I think that both of create --overwrite and update --missing_ok should work in the same way, so it is a matter of taste or understandability.

Contributions are always welcome! Please send a PR with a reference to this issue. Thanks!

jiyongjung0 avatar Apr 27 '21 10:04 jiyongjung0

@jiyongjung0, thanks for the clarification. From my first readI thought pipeline update --missing_ok would create a new version of the pipeline even when the local pipeline metadata is "missing" (e.g., when you're running the update in a different context than you ran the original create).

ghost avatar Apr 28 '21 00:04 ghost

@jiyongjung0 alright then!. thanks

FatimahAdwan avatar Apr 28 '21 12:04 FatimahAdwan