-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Object Versioning #8070
[WIP] Object Versioning #8070
Conversation
Co-authored-by:Peter Chung <[email protected]>
This reverts commit 91c3e19.
Co-authored-by: Peter Chung <[email protected]>
added migrate decorator to transform data from and to different versions
- Added a stash layer for basic CRUD - Added a object search API to search object info by name Co-authored-by: Kien Dang <[email protected]> Co-authored-by: Peter Chung <[email protected]>
rename variables to store transfroms and version in SyftMigrationRegistry fix register_transform move logic of register version to __init_subclass__
add get_migration method
- move SyftMigrationRegistry to SyftObject - move migrate_to method to SyftObject - add method to get migration transform for given version
rename stash and service for SyftObjectMetadata to MigrationStateStash and service
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
add method to upgrade protocol generate protocol_state.json and protocol_state_dev.json
- fix casting of protocol version
- add property to list supported protocol version - add property to list latest protocol version - add method to validate current protocol state - update protocol_state_dev.json Co-authored-by: Kien Dang <[email protected]> Co-authored-by: Peter Chung <[email protected]> Co-authored-by: Khoa Nguyen <[email protected]>
- calculate communication protocol on client initialization - pass communication protocol to get_api - add utility methods to data protocol and SyftMigrationRegistry Co-authored-by: Peter Chung <[email protected]> Co-authored-by: Khoa Nguyen <[email protected]>
- method to migrate args and kwargs for given protocol - migrate args and kwargs and result on making api call - migrate args and kwargs and result in service_method Co-authored-by: Kien Dang <[email protected]>
- type cast protocol version to str while indexing - update migrate_args_and_kwargs to migrate objects via a range
@@ -454,6 +476,25 @@ def post_init(self) -> None: | |||
if self.metadata is None: | |||
self._fetch_node_metadata(self.credentials) | |||
|
|||
self.communication_protocol = self.__get_communication_protocol( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Double __ on the left hand side causes name mangling. I am not really a fan of this, considering you can still overwrite it anyway even when mangled. From what I can tell the only good use of it would be multiple inheritance to avoid conflicting two methods with the same name.
Is there another reason why you think we should use it, or could this be renamed to _get_communication_protocol?
@@ -454,10 +453,31 @@ def root_client(self): | |||
root_client.api.refresh_api_callback() | |||
return root_client | |||
|
|||
def __validate_data_migration_state(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above
moved to #8122 |
Description
Please include a summary of the change, the motivation, and any additional context that will help others understand your PR. If it closes one or more open issues, please tag them as described here.
Affected Dependencies
List any dependencies that are required for this change.
How has this been tested?
Checklist