Upgrade marshmallow dependency from 3.x to 4.x in azure-ai-ml package #41715
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR upgrades the marshmallow dependency from version 3.x to 4.x across the azure-ai-ml package to leverage improved performance, enhanced type safety, and compatibility with the latest serialization standards.
Changes Made
Dependency Updates
>=3.5,<4.0.0
to>=4.0.0,<5.0.0
>=3.5,<4.0.0
to>=4.0.0,<5.0.0
Compatibility Validation
test_marshmallow_migration.py
)Migration Analysis
The codebase analysis revealed that azure-ai-ml uses marshmallow patterns that are fully compatible with version 4.x:
✅ No Breaking Changes Found:
fields.Nested("self")
patternsmarshmallow.__version__
✅ Validated Patterns:
Testing
The migration includes a comprehensive test script that validates:
All tests pass, confirming the upgrade maintains full backward compatibility while providing access to marshmallow 4.x improvements.
Benefits
Risk Assessment
Low Risk: The upgrade is backward compatible with existing code patterns. The validation script ensures all critical functionality continues to work as expected.
Fixes the marshmallow dependency upgrade requirement while maintaining full compatibility with existing azure-ai-ml functionality.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.