{"action":"closed","number":2502,"pull_request":{"url":"https://api.github.com/repos/OpenMined/PySyft/pulls/2502","id":307057370,"node_id":"MDExOlB1bGxSZXF1ZXN0MzA3MDU3Mzcw","html_url":"https://github.com/OpenMined/PySyft/pull/2502","diff_url":"https://github.com/OpenMined/PySyft/pull/2502.diff","patch_url":"https://github.com/OpenMined/PySyft/pull/2502.patch","issue_url":"https://api.github.com/repos/OpenMined/PySyft/issues/2502","number":2502,"state":"closed","locked":false,"title":"Modularizing frameworks","user":{"login":"jvmancuso","id":7891333,"node_id":"MDQ6VXNlcjc4OTEzMzM=","avatar_url":"https://avatars2.githubusercontent.com/u/7891333?v=4","gravatar_id":"","url":"https://api.github.com/users/jvmancuso","html_url":"https://github.com/jvmancuso","followers_url":"https://api.github.com/users/jvmancuso/followers","following_url":"https://api.github.com/users/jvmancuso/following{/other_user}","gists_url":"https://api.github.com/users/jvmancuso/gists{/gist_id}","starred_url":"https://api.github.com/users/jvmancuso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jvmancuso/subscriptions","organizations_url":"https://api.github.com/users/jvmancuso/orgs","repos_url":"https://api.github.com/users/jvmancuso/repos","events_url":"https://api.github.com/users/jvmancuso/events{/privacy}","received_events_url":"https://api.github.com/users/jvmancuso/received_events","type":"User","site_admin":false},"body":"Closes #2517.\r\n\r\nPer OpenMined/rfcs#3, this PR introduces a separation between the torch framework and core components of PySyft.  Here, I've focused on generalizing TorchHook and torch.Tensor throughout the code, including in the definitions for BaseWorker, AbstractTensor, PointerTensor, and related functionality.\r\n\r\nI've also created a `BaseHook` that should allow for calling framework-common functions in a framework-agnostic way (e.g. `create_shape` that calls either `torch.Size()` or `tensorflow.TensorShape` under the hood depending on what's in use).\r\n\r\nSimilarly, for when type checks are necessary, I've created `FrameworkTensor`, `FrameworkTensorType`, and `FrameworkTensorShape`.  These last abstractions dynamically determine their own type definitions based on what dependencies are installed: for example, if both torch and syft-tensorflow are installed, `FrameworkTensor = (torch.Tensor, tf.Tensor)` and `FrameworkTensorType = Union[torch.Tensor, tf.Tensor]`.  This is built to be extended with further framework types as they're added.\r\n\r\nFinally, I've improved the dependency_check to be more robust to various dependency combinations. Note I have NOT yet changed the packaging to allow for different installation structures as planned in the connected RFC.","created_at":"2019-08-13T20:03:01Z","updated_at":"2019-08-19T19:49:37Z","closed_at":"2019-08-19T19:49:37Z","merged_at":"2019-08-19T19:49:37Z","merge_commit_sha":"4fe48d15bf9686c0c67ad7b60c72ade81b62dc64","assignee":{"login":"jvmancuso","id":7891333,"node_id":"MDQ6VXNlcjc4OTEzMzM=","avatar_url":"https://avatars2.githubusercontent.com/u/7891333?v=4","gravatar_id":"","url":"https://api.github.com/users/jvmancuso","html_url":"https://github.com/jvmancuso","followers_url":"https://api.github.com/users/jvmancuso/followers","following_url":"https://api.github.com/users/jvmancuso/following{/other_user}","gists_url":"https://api.github.com/users/jvmancuso/gists{/gist_id}","starred_url":"https://api.github.com/users/jvmancuso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jvmancuso/subscriptions","organizations_url":"https://api.github.com/users/jvmancuso/orgs","repos_url":"https://api.github.com/users/jvmancuso/repos","events_url":"https://api.github.com/users/jvmancuso/events{/privacy}","received_events_url":"https://api.github.com/users/jvmancuso/received_events","type":"User","site_admin":false},"assignees":[{"login":"jvmancuso","id":7891333,"node_id":"MDQ6VXNlcjc4OTEzMzM=","avatar_url":"https://avatars2.githubusercontent.com/u/7891333?v=4","gravatar_id":"","url":"https://api.github.com/users/jvmancuso","html_url":"https://github.com/jvmancuso","followers_url":"https://api.github.com/users/jvmancuso/followers","following_url":"https://api.github.com/users/jvmancuso/following{/other_user}","gists_url":"https://api.github.com/users/jvmancuso/gists{/gist_id}","starred_url":"https://api.github.com/users/jvmancuso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jvmancuso/subscriptions","organizations_url":"https://api.github.com/users/jvmancuso/orgs","repos_url":"https://api.github.com/users/jvmancuso/repos","events_url":"https://api.github.com/users/jvmancuso/events{/privacy}","received_events_url":"https://api.github.com/users/jvmancuso/received_events","type":"User","site_admin":false},{"login":"yanndupis","id":8001016,"node_id":"MDQ6VXNlcjgwMDEwMTY=","avatar_url":"https://avatars1.githubusercontent.com/u/8001016?v=4","gravatar_id":"","url":"https://api.github.com/users/yanndupis","html_url":"https://github.com/yanndupis","followers_url":"https://api.github.com/users/yanndupis/followers","following_url":"https://api.github.com/users/yanndupis/following{/other_user}","gists_url":"https://api.github.com/users/yanndupis/gists{/gist_id}","starred_url":"https://api.github.com/users/yanndupis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yanndupis/subscriptions","organizations_url":"https://api.github.com/users/yanndupis/orgs","repos_url":"https://api.github.com/users/yanndupis/repos","events_url":"https://api.github.com/users/yanndupis/events{/privacy}","received_events_url":"https://api.github.com/users/yanndupis/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/OpenMined/PySyft/pulls/2502/commits","review_comments_url":"https://api.github.com/repos/OpenMined/PySyft/pulls/2502/comments","review_comment_url":"https://api.github.com/repos/OpenMined/PySyft/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OpenMined/PySyft/issues/2502/comments","statuses_url":"https://api.github.com/repos/OpenMined/PySyft/statuses/8007f85bd91e568d108ae9d9d3382a08b3ecaf2e","head":{"label":"dropoutlabs:tf-serde","ref":"tf-serde","sha":"8007f85bd91e568d108ae9d9d3382a08b3ecaf2e","user":{"login":"dropoutlabs","id":37854542,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM3ODU0NTQy","avatar_url":"https://avatars3.githubusercontent.com/u/37854542?v=4","gravatar_id":"","url":"https://api.github.com/users/dropoutlabs","html_url":"https://github.com/dropoutlabs","followers_url":"https://api.github.com/users/dropoutlabs/followers","following_url":"https://api.github.com/users/dropoutlabs/following{/other_user}","gists_url":"https://api.github.com/users/dropoutlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/dropoutlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dropoutlabs/subscriptions","organizations_url":"https://api.github.com/users/dropoutlabs/orgs","repos_url":"https://api.github.com/users/dropoutlabs/repos","events_url":"https://api.github.com/users/dropoutlabs/events{/privacy}","received_events_url":"https://api.github.com/users/dropoutlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":186664986,"node_id":"MDEwOlJlcG9zaXRvcnkxODY2NjQ5ODY=","name":"PySyft","full_name":"dropoutlabs/PySyft","private":false,"owner":{"login":"dropoutlabs","id":37854542,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM3ODU0NTQy","avatar_url":"https://avatars3.githubusercontent.com/u/37854542?v=4","gravatar_id":"","url":"https://api.github.com/users/dropoutlabs","html_url":"https://github.com/dropoutlabs","followers_url":"https://api.github.com/users/dropoutlabs/followers","following_url":"https://api.github.com/users/dropoutlabs/following{/other_user}","gists_url":"https://api.github.com/users/dropoutlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/dropoutlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dropoutlabs/subscriptions","organizations_url":"https://api.github.com/users/dropoutlabs/orgs","repos_url":"https://api.github.com/users/dropoutlabs/repos","events_url":"https://api.github.com/users/dropoutlabs/events{/privacy}","received_events_url":"https://api.github.com/users/dropoutlabs/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/dropoutlabs/PySyft","description":"A library for encrypted, privacy preserving deep learning","fork":true,"url":"https://api.github.com/repos/dropoutlabs/PySyft","forks_url":"https://api.github.com/repos/dropoutlabs/PySyft/forks","keys_url":"https://api.github.com/repos/dropoutlabs/PySyft/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dropoutlabs/PySyft/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dropoutlabs/PySyft/teams","hooks_url":"https://api.github.com/repos/dropoutlabs/PySyft/hooks","issue_events_url":"https://api.github.com/repos/dropoutlabs/PySyft/issues/events{/number}","events_url":"https://api.github.com/repos/dropoutlabs/PySyft/events","assignees_url":"https://api.github.com/repos/dropoutlabs/PySyft/assignees{/user}","branches_url":"https://api.github.com/repos/dropoutlabs/PySyft/branches{/branch}","tags_url":"https://api.github.com/repos/dropoutlabs/PySyft/tags","blobs_url":"https://api.github.com/repos/dropoutlabs/PySyft/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dropoutlabs/PySyft/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dropoutlabs/PySyft/git/refs{/sha}","trees_url":"https://api.github.com/repos/dropoutlabs/PySyft/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dropoutlabs/PySyft/statuses/{sha}","languages_url":"https://api.github.com/repos/dropoutlabs/PySyft/languages","stargazers_url":"https://api.github.com/repos/dropoutlabs/PySyft/stargazers","contributors_url":"https://api.github.com/repos/dropoutlabs/PySyft/contributors","subscribers_url":"https://api.github.com/repos/dropoutlabs/PySyft/subscribers","subscription_url":"https://api.github.com/repos/dropoutlabs/PySyft/subscription","commits_url":"https://api.github.com/repos/dropoutlabs/PySyft/commits{/sha}","git_commits_url":"https://api.github.com/repos/dropoutlabs/PySyft/git/commits{/sha}","comments_url":"https://api.github.com/repos/dropoutlabs/PySyft/comments{/number}","issue_comment_url":"https://api.github.com/repos/dropoutlabs/PySyft/issues/comments{/number}","contents_url":"https://api.github.com/repos/dropoutlabs/PySyft/contents/{+path}","compare_url":"https://api.github.com/repos/dropoutlabs/PySyft/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dropoutlabs/PySyft/merges","archive_url":"https://api.github.com/repos/dropoutlabs/PySyft/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dropoutlabs/PySyft/downloads","issues_url":"https://api.github.com/repos/dropoutlabs/PySyft/issues{/number}","pulls_url":"https://api.github.com/repos/dropoutlabs/PySyft/pulls{/number}","milestones_url":"https://api.github.com/repos/dropoutlabs/PySyft/milestones{/number}","notifications_url":"https://api.github.com/repos/dropoutlabs/PySyft/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dropoutlabs/PySyft/labels{/name}","releases_url":"https://api.github.com/repos/dropoutlabs/PySyft/releases{/id}","deployments_url":"https://api.github.com/repos/dropoutlabs/PySyft/deployments","created_at":"2019-05-14T16:59:43Z","updated_at":"2019-08-02T13:28:13Z","pushed_at":"2019-08-19T19:32:01Z","git_url":"git://github.com/dropoutlabs/PySyft.git","ssh_url":"git@github.com:dropoutlabs/PySyft.git","clone_url":"https://github.com/dropoutlabs/PySyft.git","svn_url":"https://github.com/dropoutlabs/PySyft","homepage":"","size":34078,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":2,"default_branch":"dev"}},"base":{"label":"OpenMined:dev","ref":"dev","sha":"bf5ac8e7e0174e676450605546c8ae80da3f9023","user":{"login":"OpenMined","id":30185530,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMwMTg1NTMw","avatar_url":"https://avatars3.githubusercontent.com/u/30185530?v=4","gravatar_id":"","url":"https://api.github.com/users/OpenMined","html_url":"https://github.com/OpenMined","followers_url":"https://api.github.com/users/OpenMined/followers","following_url":"https://api.github.com/users/OpenMined/following{/other_user}","gists_url":"https://api.github.com/users/OpenMined/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenMined/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenMined/subscriptions","organizations_url":"https://api.github.com/users/OpenMined/orgs","repos_url":"https://api.github.com/users/OpenMined/repos","events_url":"https://api.github.com/users/OpenMined/events{/privacy}","received_events_url":"https://api.github.com/users/OpenMined/received_events","type":"Organization","site_admin":false},"repo":{"id":97641933,"node_id":"MDEwOlJlcG9zaXRvcnk5NzY0MTkzMw==","name":"PySyft","full_name":"OpenMined/PySyft","private":false,"owner":{"login":"OpenMined","id":30185530,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMwMTg1NTMw","avatar_url":"https://avatars3.githubusercontent.com/u/30185530?v=4","gravatar_id":"","url":"https://api.github.com/users/OpenMined","html_url":"https://github.com/OpenMined","followers_url":"https://api.github.com/users/OpenMined/followers","following_url":"https://api.github.com/users/OpenMined/following{/other_user}","gists_url":"https://api.github.com/users/OpenMined/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenMined/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenMined/subscriptions","organizations_url":"https://api.github.com/users/OpenMined/orgs","repos_url":"https://api.github.com/users/OpenMined/repos","events_url":"https://api.github.com/users/OpenMined/events{/privacy}","received_events_url":"https://api.github.com/users/OpenMined/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/OpenMined/PySyft","description":"A library for encrypted, privacy preserving deep learning","fork":false,"url":"https://api.github.com/repos/OpenMined/PySyft","forks_url":"https://api.github.com/repos/OpenMined/PySyft/forks","keys_url":"https://api.github.com/repos/OpenMined/PySyft/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OpenMined/PySyft/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OpenMined/PySyft/teams","hooks_url":"https://api.github.com/repos/OpenMined/PySyft/hooks","issue_events_url":"https://api.github.com/repos/OpenMined/PySyft/issues/events{/number}","events_url":"https://api.github.com/repos/OpenMined/PySyft/events","assignees_url":"https://api.github.com/repos/OpenMined/PySyft/assignees{/user}","branches_url":"https://api.github.com/repos/OpenMined/PySyft/branches{/branch}","tags_url":"https://api.github.com/repos/OpenMined/PySyft/tags","blobs_url":"https://api.github.com/repos/OpenMined/PySyft/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OpenMined/PySyft/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OpenMined/PySyft/git/refs{/sha}","trees_url":"https://api.github.com/repos/OpenMined/PySyft/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OpenMined/PySyft/statuses/{sha}","languages_url":"https://api.github.com/repos/OpenMined/PySyft/languages","stargazers_url":"https://api.github.com/repos/OpenMined/PySyft/stargazers","contributors_url":"https://api.github.com/repos/OpenMined/PySyft/contributors","subscribers_url":"https://api.github.com/repos/OpenMined/PySyft/subscribers","subscription_url":"https://api.github.com/repos/OpenMined/PySyft/subscription","commits_url":"https://api.github.com/repos/OpenMined/PySyft/commits{/sha}","git_commits_url":"https://api.github.com/repos/OpenMined/PySyft/git/commits{/sha}","comments_url":"https://api.github.com/repos/OpenMined/PySyft/comments{/number}","issue_comment_url":"https://api.github.com/repos/OpenMined/PySyft/issues/comments{/number}","contents_url":"https://api.github.com/repos/OpenMined/PySyft/contents/{+path}","compare_url":"https://api.github.com/repos/OpenMined/PySyft/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OpenMined/PySyft/merges","archive_url":"https://api.github.com/repos/OpenMined/PySyft/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OpenMined/PySyft/downloads","issues_url":"https://api.github.com/repos/OpenMined/PySyft/issues{/number}","pulls_url":"https://api.github.com/repos/OpenMined/PySyft/pulls{/number}","milestones_url":"https://api.github.com/repos/OpenMined/PySyft/milestones{/number}","notifications_url":"https://api.github.com/repos/OpenMined/PySyft/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OpenMined/PySyft/labels{/name}","releases_url":"https://api.github.com/repos/OpenMined/PySyft/releases{/id}","deployments_url":"https://api.github.com/repos/OpenMined/PySyft/deployments","created_at":"2017-07-18T20:41:16Z","updated_at":"2019-08-19T19:22:38Z","pushed_at":"2019-08-19T19:49:37Z","git_url":"git://github.com/OpenMined/PySyft.git","ssh_url":"git@github.com:OpenMined/PySyft.git","clone_url":"https://github.com/OpenMined/PySyft.git","svn_url":"https://github.com/OpenMined/PySyft","homepage":"","size":35340,"stargazers_count":3743,"watchers_count":3743,"language":"Python","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":847,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":156,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":847,"open_issues":156,"watchers":3743,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/OpenMined/PySyft/pulls/2502"},"html":{"href":"https://github.com/OpenMined/PySyft/pull/2502"},"issue":{"href":"https://api.github.com/repos/OpenMined/PySyft/issues/2502"},"comments":{"href":"https://api.github.com/repos/OpenMined/PySyft/issues/2502/comments"},"review_comments":{"href":"https://api.github.com/repos/OpenMined/PySyft/pulls/2502/comments"},"review_comment":{"href":"https://api.github.com/repos/OpenMined/PySyft/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OpenMined/PySyft/pulls/2502/commits"},"statuses":{"href":"https://api.github.com/repos/OpenMined/PySyft/statuses/8007f85bd91e568d108ae9d9d3382a08b3ecaf2e"}},"author_association":"MEMBER","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"jvmancuso","id":7891333,"node_id":"MDQ6VXNlcjc4OTEzMzM=","avatar_url":"https://avatars2.githubusercontent.com/u/7891333?v=4","gravatar_id":"","url":"https://api.github.com/users/jvmancuso","html_url":"https://github.com/jvmancuso","followers_url":"https://api.github.com/users/jvmancuso/followers","following_url":"https://api.github.com/users/jvmancuso/following{/other_user}","gists_url":"https://api.github.com/users/jvmancuso/gists{/gist_id}","starred_url":"https://api.github.com/users/jvmancuso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jvmancuso/subscriptions","organizations_url":"https://api.github.com/users/jvmancuso/orgs","repos_url":"https://api.github.com/users/jvmancuso/repos","events_url":"https://api.github.com/users/jvmancuso/events{/privacy}","received_events_url":"https://api.github.com/users/jvmancuso/received_events","type":"User","site_admin":false},"comments":1,"review_comments":86,"maintainer_can_modify":false,"commits":12,"additions":479,"deletions":333,"changed_files":53}}
{"actor":{"display_login":"jvmancuso"}}