https://flyte.org logo
#ask-the-community
Title
# ask-the-community
r

Ryuu

02/01/2024, 10:02 AM
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, ...?
k

Kevin Su

02/05/2024, 6:49 AM
yes, I think so.
did you see any error?
r

Ryuu

02/05/2024, 6:52 AM
I have just tested with simple type and it's ok
@Kevin Su i will ask you later if i have any issues.
k

Kevin Su

02/05/2024, 7:02 AM
thanks. also test structuredDataset when you get a chance.