colossal-waitress-79394
12/11/2023, 12:38 PMRPC Failed, with Status: StatusCode.INVALID_ARGUMENT
details: workflow with different structure already exists
I am actively developing the workflow and deploying+running it using pyflyte run
. How is the "version" of the workflow being calculated?tall-lock-23197
nice-airport-86898
12/12/2023, 2:43 PMpyflyte run
I did pyflyte package
and flytectl register
(as described here). You can specify a version when you do flytectl register
.freezing-airport-6809
freezing-airport-6809
freezing-airport-6809
freezing-airport-6809
freezing-airport-6809
colossal-waitress-79394
12/12/2023, 5:16 PMcolossal-waitress-79394
12/12/2023, 5:16 PMfreezing-airport-6809
rough-sugar-4818
01/24/2024, 8:54 AMworkflow with different structure already exists
) using pyflyte run
or pyflyte register
without changing the code. Looking at the "Input request" which makes the RPC fail, it seems that in my case its due to the map_task
names which are changed each time I rerun the registration. E.g:
• workflow_structure.map_task_reconstruction_export_ff143a7aae0d9318af407c6d809ad586
• workflow_structure.map_task_reconstruction_export_81fa1b95e5ddc8a7850383cf2c28ac0d
The hash at the end of the name property changes.rough-sugar-4818
01/24/2024, 9:11 AMrough-sugar-4818
01/24/2024, 9:23 AMcollection_interface.__str__()
which is hashed to be added at the end of the name of the map_task function, I'm noticing that the issue comes from the BatchSize
object which has a naive str representation. Somewhere in my function signature I'm using Annotated[FlyteDirectory, BatchSize(100)]
(this is the output of each task) and this translates in the collection_interface.__str__()
as:
• typing.Annotated[flytekit.types.directory.types.FlyteDirectory, <flytekit.core.type_engine.BatchSize object at 0x132e8fb50>]
The memory adress (0x132e8fb50
) in the str representation changes each time.rough-sugar-4818
01/24/2024, 9:45 AMclass MyBatchSize(BatchSize):
def __repr__(self) -> str:
"""returns the same naive str representation as any python object but without the memory address"""
return f"<{self.__class__.__module__}.{self.__class__.__name__} object>"
and us this class to annotate the FlyteDirectory. Works like a charm.rough-sugar-4818
01/24/2024, 1:42 PMtall-lock-23197