You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to get a FlyteExecution output with execution.outputs["o0"] where the output type is torch.nn.Sequential (a subclass of torch.nn.Module`) raises the following error:
Traceback (most recent call last):
File "/Users/nielsbantilan/git/flyte-demos/flyte_demo/test.py", line 23, in <module>
print(execution.outputs["o0"])
File "/Users/nielsbantilan/miniconda3/envs/flyte-demos/lib/python3.9/site-packages/flytekit/core/type_engine.py", line 1584, in __getitem__
return self.get(key)
File "/Users/nielsbantilan/miniconda3/envs/flyte-demos/lib/python3.9/site-packages/flytekit/core/type_engine.py", line 1613, in get
val = TypeEngine.to_python_value(self._ctx or FlyteContext.current_context(), self._literals[attr], as_type)
File "/Users/nielsbantilan/miniconda3/envs/flyte-demos/lib/python3.9/site-packages/flytekit/core/type_engine.py", line 763, in to_python_value
transformer = cls.get_transformer(expected_python_type)
File "/Users/nielsbantilan/miniconda3/envs/flyte-demos/lib/python3.9/site-packages/flytekit/core/type_engine.py", line 702, in get_transformer
raise ValueError(f"Type {python_type} not supported currently in Flytekit. Please register a new transformer")
ValueError: Type ~T not supported currently in Flytekit. Please register a new transformer
Need to set this explicitly with execution.outputs.get("o0", as_type=torch.nn.Sequential).
Expected behavior
The flyte type engine should be able to get supported outputs without having to specify as_type.
Describe the bug
Trying to get a
FlyteExecution
output withexecution.outputs["o0"]
where the output type istorch.nn.Sequential
(a subclass of torch.nn.Module`) raises the following error:Need to set this explicitly with
execution.outputs.get("o0", as_type=torch.nn.Sequential)
.Expected behavior
The flyte type engine should be able to get supported outputs without having to specify
as_type
.Additional context to reproduce
To reproduce:
git clone https://github.com/flyteorg/flyte-demos
workflows/model_training.py
script: https://github.com/flyteorg/flyte-demos/blob/main/flyte_demo/workflows/model_training.pyflyte_demo
project directoryScreenshots
No response
Are you sure this issue hasn't been raised already?
Have you read the Code of Conduct?
The text was updated successfully, but these errors were encountered: