I want to check if the 1 outputs variable of 1 task can be match with 1 inputs variable of another task.
So simplely i check it by get task_pb2 with flytekit.client.raw.get_task
Copy code
#task1 and task2 type is flyteidl.admin.task_pb2.Task
type1 = task1.closure.compiled_task.template.interface.outputs.variables['output_1_task_1].type
type2 = task2.closure.compiled_task.template.interface.inputs.variables['input_1_task_2].type
if type1 == type2:
return True
else:
return False
is this condition good enough for all type, set of types. Include hard case such as TypeTransform, Simple Schema, ...?
g
glamorous-carpet-83516
02/05/2024, 6:49 AM
yes, I think so.
👍 1
glamorous-carpet-83516
02/05/2024, 6:49 AM
did you see any error?
f
full-evening-87657
02/05/2024, 6:52 AM
I have just tested with simple type and it's ok
full-evening-87657
02/05/2024, 7:00 AM
@glamorous-carpet-83516 i will ask you later if i have any issues.
g
glamorous-carpet-83516
02/05/2024, 7:02 AM
thanks. also test structuredDataset when you get a chance.