Skip to content

Commit 67cdeed

Browse files
authored
Better CLI output when creating snapshots (#4020)
1 parent cd22af4 commit 67cdeed

File tree

1 file changed

+18
-5
lines changed

1 file changed

+18
-5
lines changed

src/zenml/cli/pipeline.py

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1035,11 +1035,24 @@ def create_pipeline_snapshot(
10351035
tags=tags,
10361036
)
10371037

1038-
cli_utils.declare(
1039-
f"Created pipeline snapshot `{snapshot.id}`. You can now trigger "
1040-
f"this snapshot from the dashboard or by calling `zenml pipeline "
1041-
f"snapshot trigger {snapshot.id}`"
1042-
)
1038+
cli_utils.declare(f"Created pipeline snapshot `{snapshot.name}`.")
1039+
1040+
options = []
1041+
1042+
if snapshot.runnable:
1043+
options.append(
1044+
"* run this snapshot from the dashboard or by calling "
1045+
f"`zenml pipeline snapshot run {snapshot.id}`"
1046+
)
1047+
if snapshot.deployable:
1048+
options.append(
1049+
"* deploy this snapshot by calling "
1050+
f"`zenml pipeline snapshot deploy {snapshot.id}`"
1051+
)
1052+
1053+
if options:
1054+
cli_utils.declare("You can now:")
1055+
cli_utils.declare("\n".join(options))
10431056

10441057

10451058
@snapshot.command("run", help="Run a snapshot.")

0 commit comments

Comments
 (0)