Skip to content

Commit

Permalink
hack: serialize pipeline input
Browse files Browse the repository at this point in the history
  • Loading branch information
elliotzh committed Mar 24, 2023
1 parent b1a19d9 commit dcbf37c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sdk/ml/azure-ai-ml/azure/ai/ml/entities/_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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


Expand Down

0 comments on commit dcbf37c

Please sign in to comment.