From 8d58b15445f0366f507bbf427fbdd27d49657512 Mon Sep 17 00:00:00 2001 From: Philippe Moussalli Date: Wed, 19 Apr 2023 17:54:52 +0200 Subject: [PATCH] add input and output arguments --- express/component_spec.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/express/component_spec.py b/express/component_spec.py index 350bb56c7..00b1eeaf6 100644 --- a/express/component_spec.py +++ b/express/component_spec.py @@ -310,6 +310,34 @@ def output_subsets(self) -> t.Mapping[str, ComponentSubset]: } ) + @property + def input_arguments(self): + """The input arguments of the component as an immutable mapping""" + return types.MappingProxyType( + { + info["name"]: KubeflowInput( + name=info["name"], + description=info["description"], + type=info["type"], + ) + for info in self.express_component_specification["inputs"] + } + ) + + @property + def output_arguments(self): + """The output arguments of the component as an immutable mapping""" + return types.MappingProxyType( + { + info["name"]: KubeflowInput( + name=info["name"], + description=info["description"], + type=info["type"], + ) + for info in self.express_component_specification["outputs"] + } + ) + @property def name(self): return self.express_component_specification["name"]