Skip to content

Commit 97e3f94

Browse files
authored
[annotation] Fix support mldesigner class as input annotation (#36189)
* fix support mldesigner class as input annotation * fix support mldesigner class as input annotation * fix support mldesigner class as input annotation * fix support mldesigner class as input annotation * fix support mldesigner class as input annotation
1 parent 87709ac commit 97e3f94

File tree

1 file changed

+5
-2
lines changed
  • sdk/ml/azure-ai-ml/azure/ai/ml/entities/_inputs_outputs

1 file changed

+5
-2
lines changed

sdk/ml/azure-ai-ml/azure/ai/ml/entities/_inputs_outputs/utils.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -414,8 +414,11 @@ def _is_input_or_output_type(io: type, type_str: Literal["Input", "Output", "Met
414414
# mldesigner.Output -> entities.Output
415415
io = Output
416416
elif _is_primitive_type(io):
417-
if not isinstance(io, type):
418-
io = Output(type=io.TYPE_NAME) if key == return_annotation_key else Input(type=io.TYPE_NAME)
417+
io = (
418+
Output(type=io.TYPE_NAME) # type: ignore
419+
if key == return_annotation_key
420+
else Input(type=io.TYPE_NAME) # type: ignore
421+
)
419422
elif hasattr(io, "_to_io_entity_args_dict"):
420423
try:
421424
if _is_input_or_output_type(type(io), "Input"):

0 commit comments

Comments
 (0)