Skip to content
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

Closed
wants to merge 38 commits into from
Closed

[WIP] Object Versioning #8070

wants to merge 38 commits into from

Conversation

shubham3121
Copy link
Member

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?

  • Describe the tests that you ran to verify your changes.
  • Provide instructions so we can reproduce.
  • List any relevant details for your test configuration.

Checklist

shubham3121 and others added 17 commits September 5, 2023 16:08
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__
- 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
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

shubham3121 and others added 12 commits September 19, 2023 13:56
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]>
shubham3121 and others added 8 commits September 25, 2023 14:01
- 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(
Copy link
Collaborator

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):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

@madhavajay madhavajay mentioned this pull request Oct 2, 2023
4 tasks
@madhavajay
Copy link
Collaborator

moved to #8122

@madhavajay madhavajay closed this Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants