cuddly-jelly-27016
05/26/2025, 12:10 AMfrom flytekit import task, workflow
from pydantic import BaseModel
class Config(BaseModel):
bool_var: bool
@task
def create_config() -> Config:
return Config(bool_var=True)
@task
def check_bool(x: bool) -> bool:
return x
@workflow
def workflow() -> bool:
config = create_config()
return check_bool(x=config['bool_var'])
When I run this with the command
pyflyte run issue.py workflow
I get the error:
TypeTransformerFailedError: Failed to convert inputs of task 'issue.check_bool':
Error converting input 'x' at position 0:
Cannot convert literal <FlyteLiteral(Literal) scalar { blob { metadata { type { format: "PythonPickle" } } uri:
"/var/folders/zr/72m6cw8x66b4g3q_s8dmy5c00000gn/T/flyte-bgc4g0zt/raw/d8a7be6139519884010995bc2aa7ddd9/cd165a40ea1442ca1acb6fbd4b3700f4" } }> to <class 'bool'>
The bool property in the Config object is converted to a scalar.
### Screenshots
No response
### Are you sure this issue hasn't been raised already?
• Yes
### Have you read the Code of Conduct?
• Yes
flyteorg/flytecuddly-jelly-27016
05/26/2025, 12:10 AM