acoustic-carpenter-78188
07/20/2023, 6:49 PMthankful-minister-83577
thankful-minister-83577
cool-lifeguard-49380
07/20/2023, 7:18 PMloud-oil-9899
07/20/2023, 7:21 PMbroad-monitor-993
07/20/2023, 7:56 PMagreeable-kitchen-44189
07/21/2023, 5:10 AMcool-lifeguard-49380
07/28/2023, 1:30 PMfrom flytekit import task, workflow, dynamic
from pydantic import BaseModel
class Config(BaseModel):
path: str
@task
def train(cfg: Config):
print(cfg)
@dynamic(cache=True, cache_version="0.3")
def sub_wf(cfg: Config):
train(cfg=cfg)
@workflow
def wf():
sub_wf(cfg=Config(path="bar"))
if __name__ == "__main__":
wf()
Upon local execution with python test.py
, the error is:
β /home/fabiogratz/miniconda3/envs/dev/lib/python3.9/site-packages/flytekit/core/workflow.py:271 in __call__ β
β β
β β± 271 β β β raise exc β
β β
β /home/fabiogratz/miniconda3/envs/dev/lib/python3.9/site-packages/flytekit/core/workflow.py:268 in __call__ β
β β
β β± 268 β β β return flyte_entity_call_handler(self, *args, **input_kwargs) β
β β
β /home/fabiogratz/miniconda3/envs/dev/lib/python3.9/site-packages/flytekit/core/promise.py:1022 in flyte_entity_call_handler β
β β
β β± 1022 β β β result = cast(LocallyExecutable, entity).local_execute(child_ctx, **kwargs) β
β β
β /home/fabiogratz/miniconda3/envs/dev/lib/python3.9/site-packages/flytekit/core/workflow.py:290 in local_execute β
β β
β β± 290 β β function_outputs = self.execute(**kwargs_literals) β
β β
β /home/fabiogratz/miniconda3/envs/dev/lib/python3.9/site-packages/flytekit/core/workflow.py:729 in execute β
β β
β β± 729 β β return exception_scopes.user_entry_point(self._workflow_function)(**kwargs) β
β β
β /home/fabiogratz/miniconda3/envs/dev/lib/python3.9/site-packages/flytekit/exceptions/scopes.py:203 in user_entry_point β
β β
β β± 203 β β β β raise type(exc)(f"Error encountered while executing '{fn_name}':\n {exc β
β°ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ―
TypeError: Encountered error while executing workflow 'wf':
Error encountered while executing 'wf':
Parameter to MergeFrom() must be instance of same class: expected <class 'flyteidl.core.literals_pb2.Literal'> got <class
'flyteidl.core.literals_pb2.LiteralMap'>.
cool-lifeguard-49380
07/28/2023, 1:32 PMcache=False
it works. But having forgotten to bump the cache version appears not to be the problem. When activating the cache and setting a cache version that 100% was never used before, it fails with this error on the first try.cool-lifeguard-49380
07/28/2023, 1:32 PMloud-oil-9899
07/28/2023, 3:33 PM