Skip to content

Commit 080cc8a

Browse files
Fix load_from_dict to avoid passing unsupported parameters to Schema constructor
Co-authored-by: kshitij-microsoft <[email protected]>
1 parent 25a071c commit 080cc8a

File tree

1 file changed

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

1 file changed

+2
-0
lines changed

sdk/ml/azure-ai-ml/azure/ai/ml/entities/_util.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,8 @@ def load_from_dict(schema: Any, data: Dict, context: Dict, additional_message: s
189189
:rtype: Any
190190
"""
191191
try:
192+
# In marshmallow 4.x, only pass context to schema constructor,
193+
# other parameters should be passed to load() method
192194
return schema(context=context).load(data, **kwargs)
193195
except ValidationError as e:
194196
pretty_error = json.dumps(e.normalized_messages(), indent=2)

0 commit comments

Comments
 (0)