Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

returned type validation inconsistent between lightweight component and container build #1580

Closed
SinaChavoshi opened this issue Jul 1, 2019 · 2 comments · Fixed by #1889
Closed

Comments

@SinaChavoshi
Copy link
Contributor

SinaChavoshi commented Jul 1, 2019

Returned type validation for build_python_component is defined as _component_builder.py#L313

    if 'return' in  annotations and annotations['return'] not in [int, float, str, bool]:
      raise Exception('Output type not supported and supported types are [int, float, str, bool]')

Which does not support NamedTuples, however func_to_container_op supports NamedTuple with logic defined @ _python_op.py#L136

@Ark-kun
Copy link
Contributor

Ark-kun commented Jul 26, 2019

Lightweight components are more advanced in multiple aspects. They support multiple outputs and allow specifying arbitrary types. Python container components will be soon be merged with lightweight components an use the lightweight components' code generator, so this issue will be fixed by that effort.

@Ark-kun
Copy link
Contributor

Ark-kun commented Jul 29, 2019

Will be fixed by #1687

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants