Python: Refactor workflows to use SerializationMixin from DictConvertible
#1957
+58
−84
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.
Motivation and Context
The workflow code uses a separate
DictConvertibleclass with methods liketo_dict(),from_dict(),to_json(), andfrom_json(). These methods are also available in the core library underSerializationMixin. So the code is aligned, workflows is moving to useSerializationMixinremoving the need forDictConvertible.This is a pure internal refactoring that maintains complete backwards compatibility while standardizing the codebase on
SerializationMixin. Users won't need to change any code, and all existing serialized workflows/checkpoints will continue to work. Users will have access to additional optional features likeexcludeandexclude_noneparameters in to_dict(), which is an enhancement, and a breaking change.Description
Contribution Checklist