From b75a76bcbc898c84876f98d377cdd3a848cf249a Mon Sep 17 00:00:00 2001 From: weiwee Date: Wed, 28 Jun 2023 18:03:57 +0800 Subject: [PATCH] fix artifact-type Signed-off-by: weiwee --- python/fate/components/entrypoint/component_cli.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/python/fate/components/entrypoint/component_cli.py b/python/fate/components/entrypoint/component_cli.py index 90af5ebb7e..cea9a8ac52 100644 --- a/python/fate/components/entrypoint/component_cli.py +++ b/python/fate/components/entrypoint/component_cli.py @@ -194,6 +194,13 @@ def artifact_type(name, role, stage, output_path): cpn = load_component(name) role = Role.from_str(role) stage = Stage.from_str(stage) + if not stage.is_default: + for stage_component in cpn.stage_components: + if stage_component.name == stage.name: + cpn = stage_component + break + else: + raise ValueError(f"stage `{stage.name}` for component `{component.name}` not supported") if output_path: cpn.dump_runtime_io_yaml(role, stage, output_path)