Skip to content

Commit

Permalink
Merge pull request #32 from ml6team/feature/access-properties-express…
Browse files Browse the repository at this point in the history
…-components

Add input and output arguments as ComponentSpec properties
  • Loading branch information
NielsRogge authored Apr 19, 2023
2 parents 06ea677 + 8d58b15 commit db5807a
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions express/component_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down

0 comments on commit db5807a

Please sign in to comment.