diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_util.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_util.py index 2c68f0a5d9696..8f0214ee7a25e 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_util.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_util.py @@ -197,7 +197,7 @@ def is_empty_target(obj): ) -def convert_ordered_dict_to_dict(target_object: Union[Dict, List], remove_empty=True) -> Union[Dict, List]: +def convert_ordered_dict_to_dict(target_object: Union[Dict, List, Any], remove_empty=True) -> Union[Dict, List, Any]: """Convert ordered dict to dict. Remove keys with None value. This is a workaround for rest request must be in dict instead of ordered dict. @@ -217,6 +217,10 @@ def convert_ordered_dict_to_dict(target_object: Union[Dict, List], remove_empty= if not is_empty_target(value) or not remove_empty: new_dict[key] = value return new_dict + from azure.ai.ml.entities._job.pipeline._io import PipelineInput + + if isinstance(target_object, PipelineInput): + return str(target_object) return target_object