From dbfef82a2a1129b057394a0445d847efd534c382 Mon Sep 17 00:00:00 2001 From: khoaguin Date: Thu, 17 Aug 2023 11:02:30 +0700 Subject: [PATCH 01/24] Type checking for the `permission` argument of `has_permission` of MongoStorePartition --- packages/syft/src/syft/store/mongo_document_store.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/syft/src/syft/store/mongo_document_store.py b/packages/syft/src/syft/store/mongo_document_store.py index cd1f0e0aa42..598fca62bac 100644 --- a/packages/syft/src/syft/store/mongo_document_store.py +++ b/packages/syft/src/syft/store/mongo_document_store.py @@ -23,6 +23,7 @@ from ..service.action.action_permissions import ActionObjectPermission from ..service.action.action_permissions import ActionObjectREAD from ..service.action.action_permissions import ActionObjectWRITE +from ..service.action.action_permissions import ActionPermission from ..service.response import SyftSuccess from ..types.syft_object import StorableObjectType from ..types.syft_object import SyftBaseObject @@ -346,10 +347,15 @@ def _delete( def has_permission(self, permission: ActionObjectPermission) -> bool: # TODO: implement + print("checking permission inside MongoStorePartition!!!") + if not isinstance(permission.permission, ActionPermission): + raise TypeError(f"ObjectPermission type: {permission.permission} not valid") + return True def add_permissions(self, permissions: List[ActionObjectPermission]) -> None: # TODO: implemenet + print("adding permissions inside MongoStorePartition") pass def _all( From 12ed6badaee72a7e9a17a0377f934fb8c5ad10ce Mon Sep 17 00:00:00 2001 From: khoaguin Date: Mon, 21 Aug 2023 21:32:01 +0700 Subject: [PATCH 02/24] add `with_collection_permissions` function that create the collections that store the permissions --- packages/syft/src/syft/store/mongo_client.py | 22 +++++++++++++++++++ .../src/syft/store/mongo_document_store.py | 6 +++++ 2 files changed, 28 insertions(+) diff --git a/packages/syft/src/syft/store/mongo_client.py b/packages/syft/src/syft/store/mongo_client.py index b63a94bcb7a..f5c8ea47b05 100644 --- a/packages/syft/src/syft/store/mongo_client.py +++ b/packages/syft/src/syft/store/mongo_client.py @@ -203,3 +203,25 @@ def with_collection( return Err(str(e)) return Ok(collection) + + def with_collection_permissions( + self, collection_settings: PartitionSettings, store_config: StoreConfig + ) -> Result[MongoCollection, Err]: + """ + For each collection, create a corresponding collection + that store the permissions to the data in that collection + """ + res = self.with_db(db_name=store_config.db_name) + if res.is_err(): + return res + db = res.ok() + + try: + collection_permissions_name: str = collection_settings.name + "_permissions" + collection_permissions = db.get_collection( + name=collection_permissions_name, codec_options=SYFT_CODEC_OPTIONS + ) + except BaseException as e: + return Err(str(e)) + + return Ok(collection_permissions) diff --git a/packages/syft/src/syft/store/mongo_document_store.py b/packages/syft/src/syft/store/mongo_document_store.py index 598fca62bac..b905b2559db 100644 --- a/packages/syft/src/syft/store/mongo_document_store.py +++ b/packages/syft/src/syft/store/mongo_document_store.py @@ -130,8 +130,14 @@ def init_store(self) -> Result[Ok, Err]: ) if collection_status.is_err(): return collection_status + collection_permissions_status = client.with_collection_permissions( + collection_settings=self.settings, store_config=self.store_config + ) + if collection_permissions_status.is_err(): + return collection_permissions_status self._collection = collection_status.ok() + self._permissions = collection_permissions_status.ok() return self._create_update_index() From ff6be317ebae4979fb988012a661efcda2f6a1ec Mon Sep 17 00:00:00 2001 From: khoaguin Date: Thu, 24 Aug 2023 09:12:18 +0700 Subject: [PATCH 03/24] specify output type --- packages/syft/src/syft/store/sqlite_document_store.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/syft/src/syft/store/sqlite_document_store.py b/packages/syft/src/syft/store/sqlite_document_store.py index 01b297ec4a2..27195ae7ac5 100644 --- a/packages/syft/src/syft/store/sqlite_document_store.py +++ b/packages/syft/src/syft/store/sqlite_document_store.py @@ -94,7 +94,7 @@ def _connect(self) -> None: # Set journal mode to WAL. # self._db[thread_ident()].execute("pragma journal_mode=wal") - def create_table(self): + def create_table(self) -> None: try: self.cur.execute( f"create table {self.table_name} (uid VARCHAR(32) NOT NULL PRIMARY KEY, " # nosec From d7c4d18d463bb35c65760f26288e645a5cd158fb Mon Sep 17 00:00:00 2001 From: khoaguin Date: Thu, 24 Aug 2023 09:57:20 +0700 Subject: [PATCH 04/24] add "READ" permission to User and NodeSettings permissions collections in `_set` method of MongoStorePartition --- .../src/syft/store/mongo_document_store.py | 52 ++++++++++++++++--- 1 file changed, 46 insertions(+), 6 deletions(-) diff --git a/packages/syft/src/syft/store/mongo_document_store.py b/packages/syft/src/syft/store/mongo_document_store.py index b905b2559db..477df718e16 100644 --- a/packages/syft/src/syft/store/mongo_document_store.py +++ b/packages/syft/src/syft/store/mongo_document_store.py @@ -125,11 +125,13 @@ def init_store(self) -> Result[Ok, Err]: return store_status client = MongoClient(config=self.store_config.client_config) + collection_status = client.with_collection( collection_settings=self.settings, store_config=self.store_config ) if collection_status.is_err(): return collection_status + collection_permissions_status = client.with_collection_permissions( collection_settings=self.settings, store_config=self.store_config ) @@ -209,6 +211,15 @@ def collection(self) -> Result[MongoCollection, Err]: return Ok(self._collection) + @property + def permissions(self) -> Result[MongoCollection, Err]: + if not hasattr(self, "_permissions"): + res = self.init_store() + if res.is_err(): + return res + + return Ok(self._permissions) + def _set( self, credentials: SyftVerifyKey, @@ -218,9 +229,10 @@ def _set( ) -> Result[SyftObject, str]: write_permission = ActionObjectWRITE(uid=obj.id, credentials=credentials) can_write = self.has_permission(write_permission) + print("----------- Inside MongoStorePartition._set() -----------") + print(f"{can_write = }") if can_write: storage_obj = obj.to(self.storage_type) - collection_status = self.collection if collection_status.is_err(): return collection_status @@ -232,9 +244,22 @@ def _set( collection.insert_one(storage_obj) except DuplicateKeyError as e: return Err(f"Duplicate Key Error for {obj}: {e}") + + # adding permissions + collection_permissions_status = self.permissions + if collection_permissions_status.is_err(): + return collection_permissions_status + collection_permissions: MongoCollection = collection_permissions_status.ok() + permission: str = f"{credentials.verify}_READ" + print(f"{permission = }") + permissions: dict = collection_permissions.find_one({"uid": obj.id}) + print(f"{permissions = }") + collection_permissions.insert_one({"uid": obj.id, "repr": {permission}}) + permissions: dict = collection_permissions.find_one({"uid": obj.id}) + print(f"{permissions = }") if add_permissions is not None: - pass # TODO: update permissions + pass return Ok(obj) else: return Err(f"No permission to write object with id {obj.id}") @@ -353,17 +378,32 @@ def _delete( def has_permission(self, permission: ActionObjectPermission) -> bool: # TODO: implement - print("checking permission inside MongoStorePartition!!!") + # print("---- checking permission inside MongoStorePartition!!! ---- ") if not isinstance(permission.permission, ActionPermission): raise TypeError(f"ObjectPermission type: {permission.permission} not valid") + # print(f"{self.permissions = }") + # print(self._permissions.find_one({"uid": "025b1ecac15e40929e427ebabca922db"})) + # print(type(self._permissions.find_one({"uid": "025b1ecac15e40929e427ebabca922db"}))) + + if self.root_verify_key.verify == permission.credentials.verify: + return True + return True - def add_permissions(self, permissions: List[ActionObjectPermission]) -> None: - # TODO: implemenet - print("adding permissions inside MongoStorePartition") + def add_permission(self, permission: ActionObjectPermission) -> None: + print("---- adding permission inside MongoStorePartition!!! ---- ") + # permissions = self.permissions[permission.uid] + # print(f"{permissions = }") + # permissions.add(permission.permission_string) + # self.permissions[permission.uid] = permissions pass + def add_permissions(self, permissions: List[ActionObjectPermission]) -> None: + results = [] + for permission in permissions: + results.append(self.add_permission(permission)) + def _all( self, credentials: SyftVerifyKey, From c0065e7d57a2ed53029dc36838ef19b06cb5970c Mon Sep 17 00:00:00 2001 From: khoaguin Date: Fri, 25 Aug 2023 10:32:34 +0700 Subject: [PATCH 05/24] Get back permissions and check permission in `MongoStorePartition.has_permission()` --- .../src/syft/store/mongo_document_store.py | 42 +++++++++++++------ 1 file changed, 29 insertions(+), 13 deletions(-) diff --git a/packages/syft/src/syft/store/mongo_document_store.py b/packages/syft/src/syft/store/mongo_document_store.py index 477df718e16..af216084dea 100644 --- a/packages/syft/src/syft/store/mongo_document_store.py +++ b/packages/syft/src/syft/store/mongo_document_store.py @@ -31,6 +31,7 @@ from ..types.transforms import TransformContext from ..types.transforms import transform from ..types.transforms import transform_method +from ..types.uid import UID from .document_store import DocumentStore from .document_store import PartitionKey from .document_store import QueryKey @@ -229,8 +230,7 @@ def _set( ) -> Result[SyftObject, str]: write_permission = ActionObjectWRITE(uid=obj.id, credentials=credentials) can_write = self.has_permission(write_permission) - print("----------- Inside MongoStorePartition._set() -----------") - print(f"{can_write = }") + print("----------- MongoStorePartition._set() -----------") if can_write: storage_obj = obj.to(self.storage_type) collection_status = self.collection @@ -250,12 +250,11 @@ def _set( if collection_permissions_status.is_err(): return collection_permissions_status collection_permissions: MongoCollection = collection_permissions_status.ok() - permission: str = f"{credentials.verify}_READ" - print(f"{permission = }") - permissions: dict = collection_permissions.find_one({"uid": obj.id}) - print(f"{permissions = }") - collection_permissions.insert_one({"uid": obj.id, "repr": {permission}}) - permissions: dict = collection_permissions.find_one({"uid": obj.id}) + read_permission: str = f"{credentials.verify}_READ" + collection_permissions.insert_one( + {"uid": obj.id, "repr": {read_permission}} + ) + permissions: Dict = collection_permissions.find_one({"uid": obj.id}) print(f"{permissions = }") if add_permissions is not None: # TODO: update permissions @@ -378,13 +377,24 @@ def _delete( def has_permission(self, permission: ActionObjectPermission) -> bool: # TODO: implement - # print("---- checking permission inside MongoStorePartition!!! ---- ") + print("---- MongoStorePartition.has_permission() ---- ") + print(f"{permission = }") if not isinstance(permission.permission, ActionPermission): raise TypeError(f"ObjectPermission type: {permission.permission} not valid") - # print(f"{self.permissions = }") - # print(self._permissions.find_one({"uid": "025b1ecac15e40929e427ebabca922db"})) - # print(type(self._permissions.find_one({"uid": "025b1ecac15e40929e427ebabca922db"}))) + collection_permissions_status = self.permissions + if collection_permissions_status.is_err(): + return False + collection_permissions: MongoCollection = collection_permissions_status.ok() + permissions: Optional[Dict] = collection_permissions.find_one( + {"uid": permission.uid} + ) + print(f"got back {permissions = }") + if ( + permissions is not None + and permission.permission_string in permissions["repr"] + ): + return True if self.root_verify_key.verify == permission.credentials.verify: return True @@ -392,7 +402,7 @@ def has_permission(self, permission: ActionObjectPermission) -> bool: return True def add_permission(self, permission: ActionObjectPermission) -> None: - print("---- adding permission inside MongoStorePartition!!! ---- ") + print("---- MongoStorePartition.add_permission() ----") # permissions = self.permissions[permission.uid] # print(f"{permissions = }") # permissions.add(permission.permission_string) @@ -404,6 +414,12 @@ def add_permissions(self, permissions: List[ActionObjectPermission]) -> None: for permission in permissions: results.append(self.add_permission(permission)) + def take_ownership( + self, uid: UID, credentials: SyftVerifyKey + ) -> Result[SyftSuccess, str]: + print("--- MongoStorePartition.take_ownership() ---") + return "a" + def _all( self, credentials: SyftVerifyKey, From ddce49961f09ef6c7932bd31f1ec7a245c32ae10 Mon Sep 17 00:00:00 2001 From: khoaguin Date: Tue, 29 Aug 2023 14:51:37 +0700 Subject: [PATCH 06/24] implementing `add_permission` Co-authored-by: Shubham Gupta --- packages/grid/docker-compose.yml | 2 + .../syft/src/syft/store/kv_document_store.py | 3 ++ .../src/syft/store/mongo_document_store.py | 37 ++++++++++++------- 3 files changed, 28 insertions(+), 14 deletions(-) diff --git a/packages/grid/docker-compose.yml b/packages/grid/docker-compose.yml index 2309749dfe8..ad88ad7474d 100644 --- a/packages/grid/docker-compose.yml +++ b/packages/grid/docker-compose.yml @@ -129,6 +129,8 @@ services: network_mode: service:proxy volumes: - ${BACKEND_STORAGE_PATH}:/storage + stdin_open: true + tty: true # backend_stream: # restart: always diff --git a/packages/syft/src/syft/store/kv_document_store.py b/packages/syft/src/syft/store/kv_document_store.py index 8ba859c9a48..238e2674d20 100644 --- a/packages/syft/src/syft/store/kv_document_store.py +++ b/packages/syft/src/syft/store/kv_document_store.py @@ -191,6 +191,7 @@ def _set( if not store_key_exists and ck_check == UniqueKeyCheck.EMPTY: # attempt to claim it for writing ownership_result = self.take_ownership(uid=uid, credentials=credentials) + print("---- KeyValueStorePartition._set() calls take_ownership ----") can_write = ownership_result.is_ok() elif not ignore_duplicates: keys = ", ".join(f"`{key.key}`" for key in unique_query_keys.all) @@ -211,6 +212,7 @@ def _set( obj=obj, ) self.data[uid] = obj + print("---- KeyValueStorePartition._set() ----") if uid not in self.permissions: # create default permissions self.permissions[uid] = set() @@ -230,6 +232,7 @@ def take_ownership( self, uid: UID, credentials: SyftVerifyKey ) -> Result[SyftSuccess, str]: # first person using this UID can claim ownership + print("---- KeyValueStorePartition.take_ownership() ----") if uid not in self.permissions and uid not in self.data: self.add_permissions( [ diff --git a/packages/syft/src/syft/store/mongo_document_store.py b/packages/syft/src/syft/store/mongo_document_store.py index af216084dea..7ff59fdff89 100644 --- a/packages/syft/src/syft/store/mongo_document_store.py +++ b/packages/syft/src/syft/store/mongo_document_store.py @@ -23,7 +23,6 @@ from ..service.action.action_permissions import ActionObjectPermission from ..service.action.action_permissions import ActionObjectREAD from ..service.action.action_permissions import ActionObjectWRITE -from ..service.action.action_permissions import ActionPermission from ..service.response import SyftSuccess from ..types.syft_object import StorableObjectType from ..types.syft_object import SyftBaseObject @@ -230,7 +229,8 @@ def _set( ) -> Result[SyftObject, str]: write_permission = ActionObjectWRITE(uid=obj.id, credentials=credentials) can_write = self.has_permission(write_permission) - print("----------- MongoStorePartition._set() -----------") + print("---- MongoStorePartition._set() ----") + if can_write: storage_obj = obj.to(self.storage_type) collection_status = self.collection @@ -245,14 +245,19 @@ def _set( except DuplicateKeyError as e: return Err(f"Duplicate Key Error for {obj}: {e}") + store_query_key = self.settings.store_key.with_obj(obj) + print(f"{store_query_key = }") + # adding permissions collection_permissions_status = self.permissions if collection_permissions_status.is_err(): return collection_permissions_status collection_permissions: MongoCollection = collection_permissions_status.ok() read_permission: str = f"{credentials.verify}_READ" + write_permission: str = f"{credentials.verify}_READ" + permissions: set = {read_permission, write_permission} collection_permissions.insert_one( - {"uid": obj.id, "repr": {read_permission}} + {"_id": obj.id, "permissions": permissions} ) permissions: Dict = collection_permissions.find_one({"uid": obj.id}) print(f"{permissions = }") @@ -379,9 +384,6 @@ def has_permission(self, permission: ActionObjectPermission) -> bool: # TODO: implement print("---- MongoStorePartition.has_permission() ---- ") print(f"{permission = }") - if not isinstance(permission.permission, ActionPermission): - raise TypeError(f"ObjectPermission type: {permission.permission} not valid") - collection_permissions_status = self.permissions if collection_permissions_status.is_err(): return False @@ -403,22 +405,29 @@ def has_permission(self, permission: ActionObjectPermission) -> bool: def add_permission(self, permission: ActionObjectPermission) -> None: print("---- MongoStorePartition.add_permission() ----") - # permissions = self.permissions[permission.uid] - # print(f"{permissions = }") - # permissions.add(permission.permission_string) - # self.permissions[permission.uid] = permissions - pass + collection_permissions_status = self.permissions + if collection_permissions_status.is_err(): + return collection_permissions_status + collection_permissions: MongoCollection = collection_permissions_status.ok() + # find the permissions with permission.uid that are already inside the database + permissions: Dict = collection_permissions.find_one({"_id": permission.uid}) + # {"_id": "adasdafa", "permissions": ["Permiss", "permission2"...]} + # update the permissions with the new permission string + permissions_strings: set = permissions["permissions"] + print(permissions_strings) + + def remove_permission(self, permission: ActionObjectPermission) -> None: + print("---- 2nd MongoStorePartition.add_permission() ----") def add_permissions(self, permissions: List[ActionObjectPermission]) -> None: - results = [] for permission in permissions: - results.append(self.add_permission(permission)) + self.add_permission(permission) def take_ownership( self, uid: UID, credentials: SyftVerifyKey ) -> Result[SyftSuccess, str]: print("--- MongoStorePartition.take_ownership() ---") - return "a" + return Err(f"UID: {uid} already owned.") def _all( self, From be16248282ebbfc7c64f94fa95110c7098bea7fd Mon Sep 17 00:00:00 2001 From: khoaguin Date: Tue, 29 Aug 2023 16:51:52 +0700 Subject: [PATCH 07/24] done implementing `add_permission` --- .../src/syft/store/mongo_document_store.py | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/syft/src/syft/store/mongo_document_store.py b/packages/syft/src/syft/store/mongo_document_store.py index 7ff59fdff89..b9a586343f9 100644 --- a/packages/syft/src/syft/store/mongo_document_store.py +++ b/packages/syft/src/syft/store/mongo_document_store.py @@ -245,22 +245,18 @@ def _set( except DuplicateKeyError as e: return Err(f"Duplicate Key Error for {obj}: {e}") - store_query_key = self.settings.store_key.with_obj(obj) - print(f"{store_query_key = }") - # adding permissions collection_permissions_status = self.permissions if collection_permissions_status.is_err(): return collection_permissions_status collection_permissions: MongoCollection = collection_permissions_status.ok() read_permission: str = f"{credentials.verify}_READ" - write_permission: str = f"{credentials.verify}_READ" - permissions: set = {read_permission, write_permission} + permissions: set = {read_permission} collection_permissions.insert_one( {"_id": obj.id, "permissions": permissions} ) - permissions: Dict = collection_permissions.find_one({"uid": obj.id}) - print(f"{permissions = }") + permissions_get: Dict = collection_permissions.find_one({"_id": obj.id}) + print(f"{permissions_get = }") if add_permissions is not None: # TODO: update permissions pass @@ -410,19 +406,23 @@ def add_permission(self, permission: ActionObjectPermission) -> None: return collection_permissions_status collection_permissions: MongoCollection = collection_permissions_status.ok() # find the permissions with permission.uid that are already inside the database + # e.g. permissions = {"_id": "7b88fdef6bff42a8991d294c3d66f757", + # "permissions": set(["permission_str_1", "permission_str_2"]}} permissions: Dict = collection_permissions.find_one({"_id": permission.uid}) - # {"_id": "adasdafa", "permissions": ["Permiss", "permission2"...]} # update the permissions with the new permission string permissions_strings: set = permissions["permissions"] - print(permissions_strings) - - def remove_permission(self, permission: ActionObjectPermission) -> None: - print("---- 2nd MongoStorePartition.add_permission() ----") + permissions_strings.add(permission.permission_string) + collection_permissions.update_one( + {"_id": permission.uid}, {"$set": {"permissions": permissions_strings}} + ) def add_permissions(self, permissions: List[ActionObjectPermission]) -> None: for permission in permissions: self.add_permission(permission) + def remove_permission(self, permission: ActionObjectPermission) -> None: + print("---- MongoStorePartition.add_permission() ----") + def take_ownership( self, uid: UID, credentials: SyftVerifyKey ) -> Result[SyftSuccess, str]: From 98f25c1fe6e3938d62e0c4e0885ceaf4bd0e8153 Mon Sep 17 00:00:00 2001 From: khoaguin Date: Wed, 30 Aug 2023 11:23:51 +0700 Subject: [PATCH 08/24] done the `remove_permission` method of MongoStorePartition --- .../src/syft/store/mongo_document_store.py | 28 +++++++++++++++---- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/packages/syft/src/syft/store/mongo_document_store.py b/packages/syft/src/syft/store/mongo_document_store.py index b9a586343f9..87bb5384171 100644 --- a/packages/syft/src/syft/store/mongo_document_store.py +++ b/packages/syft/src/syft/store/mongo_document_store.py @@ -399,8 +399,7 @@ def has_permission(self, permission: ActionObjectPermission) -> bool: return True - def add_permission(self, permission: ActionObjectPermission) -> None: - print("---- MongoStorePartition.add_permission() ----") + def add_permission(self, permission: ActionObjectPermission) -> Result[None, Err]: collection_permissions_status = self.permissions if collection_permissions_status.is_err(): return collection_permissions_status @@ -408,7 +407,11 @@ def add_permission(self, permission: ActionObjectPermission) -> None: # find the permissions with permission.uid that are already inside the database # e.g. permissions = {"_id": "7b88fdef6bff42a8991d294c3d66f757", # "permissions": set(["permission_str_1", "permission_str_2"]}} - permissions: Dict = collection_permissions.find_one({"_id": permission.uid}) + permissions: Optional[Dict] = collection_permissions.find_one( + {"_id": permission.uid} + ) + if permissions is None: + return Err(f"permission with UID {permission.uid} not found!") # update the permissions with the new permission string permissions_strings: set = permissions["permissions"] permissions_strings.add(permission.permission_string) @@ -420,8 +423,23 @@ def add_permissions(self, permissions: List[ActionObjectPermission]) -> None: for permission in permissions: self.add_permission(permission) - def remove_permission(self, permission: ActionObjectPermission) -> None: - print("---- MongoStorePartition.add_permission() ----") + def remove_permission( + self, permission: ActionObjectPermission + ) -> Result[None, Err]: + collection_permissions_status = self.permissions + if collection_permissions_status.is_err(): + return collection_permissions_status + collection_permissions: MongoCollection = collection_permissions_status.ok() + permissions: Optional[Dict] = collection_permissions.find_one( + {"_id": permission.uid} + ) + if permissions is None: + return Err(f"permission with UID {permission.uid} not found!") + permissions_strings: set = permissions["permissions"] + permissions_strings.remove(permission.permission_string) + collection_permissions.update_one( + {"_id": permission.uid}, {"$set": {"permissions": permissions_strings}} + ) def take_ownership( self, uid: UID, credentials: SyftVerifyKey From 549e60679046d867347985bafc747b04374826f2 Mon Sep 17 00:00:00 2001 From: khoaguin Date: Wed, 30 Aug 2023 16:02:41 +0700 Subject: [PATCH 09/24] implementing `has_permission` --- .../src/syft/store/mongo_document_store.py | 45 +++++++++++-------- 1 file changed, 27 insertions(+), 18 deletions(-) diff --git a/packages/syft/src/syft/store/mongo_document_store.py b/packages/syft/src/syft/store/mongo_document_store.py index 87bb5384171..28d1b07641e 100644 --- a/packages/syft/src/syft/store/mongo_document_store.py +++ b/packages/syft/src/syft/store/mongo_document_store.py @@ -23,6 +23,7 @@ from ..service.action.action_permissions import ActionObjectPermission from ..service.action.action_permissions import ActionObjectREAD from ..service.action.action_permissions import ActionObjectWRITE +from ..service.action.action_permissions import ActionPermission from ..service.response import SyftSuccess from ..types.syft_object import StorableObjectType from ..types.syft_object import SyftBaseObject @@ -249,14 +250,13 @@ def _set( collection_permissions_status = self.permissions if collection_permissions_status.is_err(): return collection_permissions_status - collection_permissions: MongoCollection = collection_permissions_status.ok() - read_permission: str = f"{credentials.verify}_READ" - permissions: set = {read_permission} - collection_permissions.insert_one( - {"_id": obj.id, "permissions": permissions} - ) - permissions_get: Dict = collection_permissions.find_one({"_id": obj.id}) - print(f"{permissions_get = }") + # collection_permissions: MongoCollection = collection_permissions_status.ok() + # read_permission: str = f"{credentials.verify}_READ" + # permissions: set = {read_permission} + # collection_permissions.insert_one( + # {"_id": obj.id, "permissions": permissions} + # ) + # permissions_get: Dict = collection_permissions.find_one({"_id": obj.id}) if add_permissions is not None: # TODO: update permissions pass @@ -377,27 +377,37 @@ def _delete( return Err(f"Failed to delete object with qk: {qk}") def has_permission(self, permission: ActionObjectPermission) -> bool: - # TODO: implement - print("---- MongoStorePartition.has_permission() ---- ") - print(f"{permission = }") + """Check if the permission is inside the permission collection""" collection_permissions_status = self.permissions if collection_permissions_status.is_err(): return False collection_permissions: MongoCollection = collection_permissions_status.ok() + + # TODO: fix for other admins + if self.root_verify_key.verify == permission.credentials.verify: + return True + permissions: Optional[Dict] = collection_permissions.find_one( - {"uid": permission.uid} + {"_id": permission.uid} ) - print(f"got back {permissions = }") + permissions_strings: set = permissions["permissions"] + if ( permissions is not None - and permission.permission_string in permissions["repr"] + and permission.permission_string in permissions_strings ): return True - if self.root_verify_key.verify == permission.credentials.verify: + if ( + permission.permission == ActionPermission.READ + and ActionObjectPermission( + permission.uid, ActionPermission.ALL_READ + ).permission_string + in permissions_strings + ): return True - return True + return False def add_permission(self, permission: ActionObjectPermission) -> Result[None, Err]: collection_permissions_status = self.permissions @@ -444,8 +454,7 @@ def remove_permission( def take_ownership( self, uid: UID, credentials: SyftVerifyKey ) -> Result[SyftSuccess, str]: - print("--- MongoStorePartition.take_ownership() ---") - return Err(f"UID: {uid} already owned.") + raise NotImplementedError def _all( self, From 280b11be11fae60f5c119bf08fe53ac4946efc83 Mon Sep 17 00:00:00 2001 From: khoaguin Date: Wed, 30 Aug 2023 16:44:26 +0700 Subject: [PATCH 10/24] done implementing `take_ownership` for MongoStorePartition --- .../syft/src/syft/store/kv_document_store.py | 3 -- .../src/syft/store/mongo_document_store.py | 28 ++++++++++++++++++- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/packages/syft/src/syft/store/kv_document_store.py b/packages/syft/src/syft/store/kv_document_store.py index 238e2674d20..8ba859c9a48 100644 --- a/packages/syft/src/syft/store/kv_document_store.py +++ b/packages/syft/src/syft/store/kv_document_store.py @@ -191,7 +191,6 @@ def _set( if not store_key_exists and ck_check == UniqueKeyCheck.EMPTY: # attempt to claim it for writing ownership_result = self.take_ownership(uid=uid, credentials=credentials) - print("---- KeyValueStorePartition._set() calls take_ownership ----") can_write = ownership_result.is_ok() elif not ignore_duplicates: keys = ", ".join(f"`{key.key}`" for key in unique_query_keys.all) @@ -212,7 +211,6 @@ def _set( obj=obj, ) self.data[uid] = obj - print("---- KeyValueStorePartition._set() ----") if uid not in self.permissions: # create default permissions self.permissions[uid] = set() @@ -232,7 +230,6 @@ def take_ownership( self, uid: UID, credentials: SyftVerifyKey ) -> Result[SyftSuccess, str]: # first person using this UID can claim ownership - print("---- KeyValueStorePartition.take_ownership() ----") if uid not in self.permissions and uid not in self.data: self.add_permissions( [ diff --git a/packages/syft/src/syft/store/mongo_document_store.py b/packages/syft/src/syft/store/mongo_document_store.py index 28d1b07641e..99eab9a4600 100644 --- a/packages/syft/src/syft/store/mongo_document_store.py +++ b/packages/syft/src/syft/store/mongo_document_store.py @@ -20,6 +20,8 @@ from ..serde.deserialize import _deserialize from ..serde.serializable import serializable from ..serde.serialize import _serialize +from ..service.action.action_permissions import ActionObjectEXECUTE +from ..service.action.action_permissions import ActionObjectOWNER from ..service.action.action_permissions import ActionObjectPermission from ..service.action.action_permissions import ActionObjectREAD from ..service.action.action_permissions import ActionObjectWRITE @@ -398,6 +400,7 @@ def has_permission(self, permission: ActionObjectPermission) -> bool: ): return True + # check ALL_READ permission if ( permission.permission == ActionPermission.READ and ActionObjectPermission( @@ -454,7 +457,30 @@ def remove_permission( def take_ownership( self, uid: UID, credentials: SyftVerifyKey ) -> Result[SyftSuccess, str]: - raise NotImplementedError + collection_permissions_status = self.permissions + if collection_permissions_status.is_err(): + return collection_permissions_status + collection_permissions: MongoCollection = collection_permissions_status.ok() + + collection_status = self.collection + if collection_status.is_err(): + return collection_status + collection: MongoCollection = collection_status.ok() + + data_uids: List[UID] = collection.distinct("_id") + permission_uids: List[UID] = collection_permissions.distinct("_id") + if uid not in permission_uids and uid not in data_uids: + self.add_permissions( + [ + ActionObjectOWNER(uid=uid, credentials=credentials), + ActionObjectWRITE(uid=uid, credentials=credentials), + ActionObjectREAD(uid=uid, credentials=credentials), + ActionObjectEXECUTE(uid=uid, credentials=credentials), + ] + ) + return Ok(SyftSuccess(message=f"Ownership of ID: {uid} taken.")) + + return Err(f"UID: {uid} already owned.") def _all( self, From a0ec0c7d62d40abc45a431e63b2c49df8698f686 Mon Sep 17 00:00:00 2001 From: Shubham Gupta Date: Wed, 30 Aug 2023 21:51:25 +0530 Subject: [PATCH 11/24] minor fixes to object permission at mongo partition store --- .../src/syft/store/mongo_document_store.py | 56 ++++++++++--------- 1 file changed, 31 insertions(+), 25 deletions(-) diff --git a/packages/syft/src/syft/store/mongo_document_store.py b/packages/syft/src/syft/store/mongo_document_store.py index 99eab9a4600..563629b96b0 100644 --- a/packages/syft/src/syft/store/mongo_document_store.py +++ b/packages/syft/src/syft/store/mongo_document_store.py @@ -232,7 +232,6 @@ def _set( ) -> Result[SyftObject, str]: write_permission = ActionObjectWRITE(uid=obj.id, credentials=credentials) can_write = self.has_permission(write_permission) - print("---- MongoStorePartition._set() ----") if can_write: storage_obj = obj.to(self.storage_type) @@ -249,19 +248,16 @@ def _set( return Err(f"Duplicate Key Error for {obj}: {e}") # adding permissions - collection_permissions_status = self.permissions - if collection_permissions_status.is_err(): - return collection_permissions_status - # collection_permissions: MongoCollection = collection_permissions_status.ok() - # read_permission: str = f"{credentials.verify}_READ" - # permissions: set = {read_permission} - # collection_permissions.insert_one( - # {"_id": obj.id, "permissions": permissions} - # ) - # permissions_get: Dict = collection_permissions.find_one({"_id": obj.id}) + read_permission = ActionObjectPermission( + uid=obj.id, + credentials=credentials.verify_key, + permission=ActionPermission.READ, + ) + self.add_permission(read_permission) + if add_permissions is not None: - # TODO: update permissions - pass + self.add_permissions(add_permissions) + return Ok(obj) else: return Err(f"No permission to write object with id {obj.id}") @@ -417,20 +413,28 @@ def add_permission(self, permission: ActionObjectPermission) -> Result[None, Err if collection_permissions_status.is_err(): return collection_permissions_status collection_permissions: MongoCollection = collection_permissions_status.ok() - # find the permissions with permission.uid that are already inside the database + + # find the permissions for the given permission.uid # e.g. permissions = {"_id": "7b88fdef6bff42a8991d294c3d66f757", - # "permissions": set(["permission_str_1", "permission_str_2"]}} + # "permissions": set(["permission_str_1", "permission_str_2"]}} permissions: Optional[Dict] = collection_permissions.find_one( {"_id": permission.uid} ) if permissions is None: - return Err(f"permission with UID {permission.uid} not found!") - # update the permissions with the new permission string - permissions_strings: set = permissions["permissions"] - permissions_strings.add(permission.permission_string) - collection_permissions.update_one( - {"_id": permission.uid}, {"$set": {"permissions": permissions_strings}} - ) + # Permission doesn't exits, add a new one + collection_permissions.insert_one( + { + "_id": permission.uid, + "permissions": {permission.permission_string}, + } + ) + else: + # update the permissions with the new permission string + permission_strings: set = permissions["permissions"] + permission_strings.add(permission.permission_string) + collection_permissions.update_one( + {"_id": permission.uid}, {"$set": {"permissions": permission_strings}} + ) def add_permissions(self, permissions: List[ActionObjectPermission]) -> None: for permission in permissions: @@ -467,9 +471,11 @@ def take_ownership( return collection_status collection: MongoCollection = collection_status.ok() - data_uids: List[UID] = collection.distinct("_id") - permission_uids: List[UID] = collection_permissions.distinct("_id") - if uid not in permission_uids and uid not in data_uids: + data: List[UID] = collection.find_one({"_id": uid}) + permissions: List[UID] = collection_permissions.find_one({"_id": uid}) + + # first person using this UID can claim ownership + if permissions is None and data is None: self.add_permissions( [ ActionObjectOWNER(uid=uid, credentials=credentials), From ea4779e31ab836992dc7581e12005427e3db7398 Mon Sep 17 00:00:00 2001 From: khoaguin Date: Thu, 31 Aug 2023 17:49:08 +0700 Subject: [PATCH 12/24] fix a small issue while passing credentials to ActionObjectPermission. Try calling `take_ownership` of the MongoStorePartition to make it similar to KeyValueStorePartition --- .../syft/src/syft/store/mongo_document_store.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/packages/syft/src/syft/store/mongo_document_store.py b/packages/syft/src/syft/store/mongo_document_store.py index 563629b96b0..bc0eb53095d 100644 --- a/packages/syft/src/syft/store/mongo_document_store.py +++ b/packages/syft/src/syft/store/mongo_document_store.py @@ -233,6 +233,20 @@ def _set( write_permission = ActionObjectWRITE(uid=obj.id, credentials=credentials) can_write = self.has_permission(write_permission) + store_query_key = self.settings.store_key.with_obj(obj) + collection_status = self.collection + if collection_status.is_err(): + return collection_status + collection = collection_status.ok() + store_key_exists = ( + collection.find_one({"_id": store_query_key.value}) is not None + ) + + if not store_key_exists: + # attempt to claim ownership for writing + ownership_result = self.take_ownership(uid=obj.id, credentials=credentials) + can_write: bool = ownership_result.is_ok() + if can_write: storage_obj = obj.to(self.storage_type) collection_status = self.collection @@ -250,7 +264,7 @@ def _set( # adding permissions read_permission = ActionObjectPermission( uid=obj.id, - credentials=credentials.verify_key, + credentials=credentials, permission=ActionPermission.READ, ) self.add_permission(read_permission) From cae2c4a4757964aa89bc2f1709b05f116416fa41 Mon Sep 17 00:00:00 2001 From: Shubham Gupta Date: Thu, 31 Aug 2023 17:46:06 +0530 Subject: [PATCH 13/24] minor fixes --- .../syft/src/syft/store/mongo_document_store.py | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/packages/syft/src/syft/store/mongo_document_store.py b/packages/syft/src/syft/store/mongo_document_store.py index bc0eb53095d..eb1e7ab5ffc 100644 --- a/packages/syft/src/syft/store/mongo_document_store.py +++ b/packages/syft/src/syft/store/mongo_document_store.py @@ -238,6 +238,7 @@ def _set( if collection_status.is_err(): return collection_status collection = collection_status.ok() + store_key_exists = ( collection.find_one({"_id": store_query_key.value}) is not None ) @@ -249,10 +250,6 @@ def _set( if can_write: storage_obj = obj.to(self.storage_type) - collection_status = self.collection - if collection_status.is_err(): - return collection_status - collection = collection_status.ok() if ignore_duplicates: collection = collection.with_options(write_concern=WriteConcern(w=0)) @@ -402,12 +399,11 @@ def has_permission(self, permission: ActionObjectPermission) -> bool: permissions: Optional[Dict] = collection_permissions.find_one( {"_id": permission.uid} ) - permissions_strings: set = permissions["permissions"] - if ( - permissions is not None - and permission.permission_string in permissions_strings - ): + if permissions is None: + return False + + if permission.permission_string in permissions["permissions"]: return True # check ALL_READ permission @@ -416,7 +412,7 @@ def has_permission(self, permission: ActionObjectPermission) -> bool: and ActionObjectPermission( permission.uid, ActionPermission.ALL_READ ).permission_string - in permissions_strings + in permissions["permissions"] ): return True From fcd997f11559323430d67d2399abfcaa5999273a Mon Sep 17 00:00:00 2001 From: Madhava Jay Date: Fri, 1 Sep 2023 17:01:09 +1000 Subject: [PATCH 14/24] Updating opendp==0.8.0 which supports aarch64 linux --- notebooks/api/0.8/01-submit-code.ipynb | 12 ++++--- .../api/0.8/06-multiple-code-requests.ipynb | 32 +++++++++++-------- packages/syft/setup.cfg | 2 +- 3 files changed, 27 insertions(+), 19 deletions(-) diff --git a/notebooks/api/0.8/01-submit-code.ipynb b/notebooks/api/0.8/01-submit-code.ipynb index 3850320f18e..e9a52f96a8a 100644 --- a/notebooks/api/0.8/01-submit-code.ipynb +++ b/notebooks/api/0.8/01-submit-code.ipynb @@ -295,11 +295,15 @@ "@sy.syft_function_single_use(trade_data=asset)\n", "def sum_trade_value_mil(trade_data):\n", " import pandas as pd\n", - " from opendp.mod import enable_features\n", - " enable_features('contrib')\n", - " from opendp.measurements import make_base_laplace\n", + " import opendp.prelude as dp\n", + " dp.enable_features(\"contrib\")\n", + " from opendp.measurements import make_laplace\n", " aggregate = 0.\n", - " base_lap = make_base_laplace(scale=5.)\n", + " base_lap = dp.m.make_base_laplace(\n", + " dp.atom_domain(T=float),\n", + " dp.absolute_distance(T=float),\n", + " scale=5.\n", + " )\n", " noise = base_lap(aggregate)\n", "\n", " df = trade_data\n", diff --git a/notebooks/api/0.8/06-multiple-code-requests.ipynb b/notebooks/api/0.8/06-multiple-code-requests.ipynb index 89a9bb4a80b..9687f21592b 100644 --- a/notebooks/api/0.8/06-multiple-code-requests.ipynb +++ b/notebooks/api/0.8/06-multiple-code-requests.ipynb @@ -170,16 +170,17 @@ "@sy.syft_function(input_policy=sy.ExactMatch(data=dataset_ptr.assets[0]),\n", " output_policy=sy.SingleExecutionExactOutput())\n", "def calculate_sum(data):\n", - "\n", - " \n", - " from opendp.mod import enable_features\n", - " enable_features('contrib')\n", - " from opendp.measurements import make_base_laplace\n", - " \n", + " import opendp.prelude as dp\n", + " dp.enable_features(\"contrib\")\n", + " from opendp.measurements import make_laplace\n", " \n", " #compute sum\n", " res = data.sum()\n", - " base_lap = make_base_laplace(scale=10.)\n", + " base_lap = dp.m.make_base_laplace(\n", + " dp.atom_domain(T=float),\n", + " dp.absolute_distance(T=float),\n", + " scale=10.\n", + " )\n", " noise_result = base_lap(res)\n", " return noise_result" ] @@ -265,14 +266,17 @@ "@sy.syft_function(input_policy=sy.ExactMatch(data=dataset_ptr.assets[0]),\n", " output_policy=sy.SingleExecutionExactOutput())\n", "def calculate_mean(data):\n", - " from opendp.mod import enable_features\n", - " enable_features('contrib')\n", - " from opendp.measurements import make_base_laplace\n", - " \n", + " import opendp.prelude as dp\n", + " dp.enable_features(\"contrib\")\n", + " from opendp.measurements import make_laplace\n", " \n", " #compute mean\n", " mean = data.mean()\n", - " base_lap = make_base_laplace(scale=10.)\n", + " base_lap = dp.m.make_base_laplace(\n", + " dp.atom_domain(T=float),\n", + " dp.absolute_distance(T=float),\n", + " scale=10.\n", + " )\n", " noise_result = base_lap(mean)\n", " return noise_result" ] @@ -311,7 +315,7 @@ }, "outputs": [], "source": [ - "assert len(project.events) ==2\n", + "assert len(project.events) == 2\n", "assert isinstance(project.events[1], sy.service.project.project.ProjectRequest)" ] }, @@ -335,7 +339,7 @@ "outputs": [], "source": [ "root_client_project.requests\n", - "assert len(root_client_project.requests) ==2" + "assert len(root_client_project.requests) == 2" ] }, { diff --git a/packages/syft/setup.cfg b/packages/syft/setup.cfg index 87de753c800..bfc15026901 100644 --- a/packages/syft/setup.cfg +++ b/packages/syft/setup.cfg @@ -35,7 +35,7 @@ syft = loguru==0.7.0 networkx==2.8 numpy>=1.22.4,<=1.24.3 - opendp==0.7.0 + opendp==0.8.0 packaging>=21.0 pandas==1.5.3 pyarrow==11.0.0 From 62110f9d62da940ce8bd600d141c11a379efd7e1 Mon Sep 17 00:00:00 2001 From: Madhava Jay Date: Fri, 1 Sep 2023 17:16:32 +1000 Subject: [PATCH 15/24] Upgrading jaxlib==0.4.14 --- .github/workflows/pr-tests-enclave.yml | 1 - .github/workflows/pr-tests-stack-public.yml | 5 ----- .github/workflows/pr-tests-stack.yml | 10 ---------- .github/workflows/pr-tests-syft.yml | 4 ---- README.md | 9 ++++----- notebooks/api/0.8/00-load-data.ipynb | 2 +- notebooks/api/0.8/01-submit-code.ipynb | 2 +- .../api/0.8/02-review-code-and-approve.ipynb | 2 +- .../0.8/03-data-scientist-download-result.ipynb | 2 +- notebooks/api/0.8/04-jax-example.ipynb | 2 +- notebooks/api/0.8/05-custom-policy.ipynb | 2 +- notebooks/api/0.8/06-multiple-code-requests.ipynb | 2 +- .../api/0.8/07-domain-register-control-flow.ipynb | 2 +- notebooks/api/0.8/08-code-version.ipynb | 2 +- notebooks/api/0.8/09-blob-storage.ipynb | 2 +- .../data-owner/01-uploading-private-data.ipynb | 2 +- .../data-owner/02-account-management.ipynb | 2 +- .../data-owner/03-messages-and-requests.ipynb | 2 +- .../data-owner/05-syft-services-api.ipynb | 2 +- .../01-installing-syft-client.ipynb | 6 ++---- .../03-working-with-private-datasets.ipynb | 2 +- .../data-scientist/05-syft-functions.ipynb | 4 ++-- .../06-messaging-and-requests.ipynb | 2 +- .../tutorials/hello-syft/01-hello-syft.ipynb | 2 +- .../model-auditing/colab/01-user-log.ipynb | 2 +- .../pandas-cookbook/01-reading-from-a-csv.ipynb | 2 +- ...2-selecting-data-finding-common-complain.ipynb | 2 +- ...ch-borough-has-the-most-noise-complaints.ipynb | 2 +- .../04-weekday-bike-most-groupby-aggregate.ipynb | 2 +- ...mbining-dataframes-scraping-weather-data.ipynb | 2 +- ...-operations-which-month-was-the-snowiest.ipynb | 2 +- .../07-cleaning-up-messy-data.ipynb | 2 +- .../08-how-to-deal-with-timestamps.ipynb | 2 +- packages/hagrid/hagrid/deps.py | 15 +-------------- packages/syft/setup.cfg | 4 ++-- tox.ini | 1 - 36 files changed, 37 insertions(+), 74 deletions(-) diff --git a/.github/workflows/pr-tests-enclave.yml b/.github/workflows/pr-tests-enclave.yml index 321bbea0726..7c6ee71cb6d 100644 --- a/.github/workflows/pr-tests-enclave.yml +++ b/.github/workflows/pr-tests-enclave.yml @@ -70,7 +70,6 @@ jobs: if: steps.changes.outputs.syft == 'true' run: | pip install --upgrade tox packaging wheel --default-timeout=60 - python -c "import platform; import os; os.system('pip install jaxlib==0.4.10 -f https://whls.blob.core.windows.net/unstable/index.html') if platform.system().lower() == 'windows' else ''" # Temporarily disabled oblv tests # - name: Run Enclave tests diff --git a/.github/workflows/pr-tests-stack-public.yml b/.github/workflows/pr-tests-stack-public.yml index 5d8d4b71811..6658e470b45 100644 --- a/.github/workflows/pr-tests-stack-public.yml +++ b/.github/workflows/pr-tests-stack-public.yml @@ -106,11 +106,6 @@ jobs: with: args: install visualstudio2019-workload-vctools -y - - name: Install jaxlib - if: steps.changes.outputs.stack == 'true' && matrix.os == 'windows' - run: | - python -c "import platform; import os; os.system('pip install jaxlib==0.4.10 -f https://whls.blob.core.windows.net/unstable/index.html') if platform.system().lower() == 'windows' else ''" - - name: Install Docker Compose if: steps.changes.outputs.stack == 'true' && runner.os == 'Linux' shell: bash diff --git a/.github/workflows/pr-tests-stack.yml b/.github/workflows/pr-tests-stack.yml index 9e9b4a913d7..2dcc1ec2f0e 100644 --- a/.github/workflows/pr-tests-stack.yml +++ b/.github/workflows/pr-tests-stack.yml @@ -118,11 +118,6 @@ jobs: with: args: install visualstudio2019-workload-vctools -y - - name: Install jaxlib - if: steps.changes.outputs.stack == 'true' && matrix.os == 'windows' - run: | - python -c "import platform; import os; os.system('pip install jaxlib==0.4.10 -f https://whls.blob.core.windows.net/unstable/index.html') if platform.system().lower() == 'windows' else ''" - - name: Install Docker Compose if: steps.changes.outputs.stack == 'true' && runner.os == 'Linux' shell: bash @@ -334,11 +329,6 @@ jobs: with: args: install visualstudio2019-workload-vctools -y - - name: Install jaxlib - if: steps.changes.outputs.stack == 'true' && matrix.os == 'windows' - run: | - python -c "import platform; import os; os.system('pip install jaxlib==0.4.10 -f https://whls.blob.core.windows.net/unstable/index.html') if platform.system().lower() == 'windows' else ''" - - name: Install Docker Compose if: steps.changes.outputs.stack == 'true' && runner.os == 'Linux' shell: bash diff --git a/.github/workflows/pr-tests-syft.yml b/.github/workflows/pr-tests-syft.yml index 1e4287ae400..520344fe39f 100644 --- a/.github/workflows/pr-tests-syft.yml +++ b/.github/workflows/pr-tests-syft.yml @@ -87,7 +87,6 @@ jobs: if: steps.changes.outputs.syft == 'true' run: | pip install --upgrade tox packaging wheel --default-timeout=60 - python -c "import platform; import os; os.system('pip install jaxlib==0.4.10 -f https://whls.blob.core.windows.net/unstable/index.html') if platform.system().lower() == 'windows' else ''" - name: Fix Colima issue on MacOS Runners if: steps.changes.outputs.syft == 'true' && matrix.os == 'macos-13' @@ -179,7 +178,6 @@ jobs: if: steps.changes.outputs.syft == 'true' || steps.changes.outputs.notebooks == 'true' run: | pip install --upgrade tox packaging wheel --default-timeout=60 - python -c "import platform; import os; os.system('pip install jaxlib==0.4.10 -f https://whls.blob.core.windows.net/unstable/index.html') if platform.system().lower() == 'windows' else ''" - name: Run notebook tests uses: nick-fields/retry@v2 @@ -249,7 +247,6 @@ jobs: if: steps.changes.outputs.stack == 'true' || steps.changes.outputs.notebooks == 'true' run: | pip install --upgrade tox packaging wheel --default-timeout=60 - python -c "import platform; import os; os.system('pip install jaxlib==0.4.10 -f https://whls.blob.core.windows.net/unstable/index.html') if platform.system().lower() == 'windows' else ''" - name: Docker Compose on Linux if: (steps.changes.outputs.stack == 'true' || steps.changes.outputs.notebooks == 'true') && matrix.os == 'ubuntu-latest' @@ -356,7 +353,6 @@ jobs: if: steps.changes.outputs.syft == 'true' run: | pip install --upgrade tox packaging wheel --default-timeout=60 - python -c "import platform; import os; os.system('pip install jaxlib==0.4.10 -f https://whls.blob.core.windows.net/unstable/index.html') if platform.system().lower() == 'windows' else ''" - name: Scan for security issues if: steps.changes.outputs.syft == 'true' diff --git a/README.md b/README.md index cce9d3cb22a..a8dd419645f 100644 --- a/README.md +++ b/README.md @@ -10,12 +10,12 @@ Perform data science on `data` that remains in `someone else's` server # Quickstart -✅ `Linux` ✅ `macOS` ✅ `Windows`\* ✅ `Docker` ✅ `Kubernetes` +✅ `Linux` ✅ `macOS` ✅ `Windows` ✅ `Docker` ✅ `Podman` ✅ `Kubernetes` ## Install Client ```bash -$ pip install -U syft -f https://whls.blob.core.windows.net/unstable/index.html +$ pip install -U syft ``` ## Launch Server @@ -93,9 +93,8 @@ $ helm install ... --set ingress.ingressClass="gce" - HAGrid 0.3 Requires: 🐍 `python` 🐙 `git` - Run: `pip install -U hagrid` - Interactive Install 🧙🏽‍♂️ WizardBETA Requires 🛵 `hagrid`: - Run: `hagrid quickstart` -- PySyft 0.8.1 Requires: 🐍 `python 3.9 - 3.11` - Run: `pip install -U syft` - \*`Windows` users must run this first: `pip install jaxlib==0.4.10 -f https://whls.blob.core.windows.net/unstable/index.html` -- PyGrid Requires: 🐳 `docker`, ☸️ `kubernetes` or 🐧 `ubuntu` VM - Run: `hagrid launch ...` +- PySyft 0.8.1 Requires: 🐍 `python 3.9 - 3.11` - Run: `pip install -U syft` +- PyGrid Requires: 🐳 `docker`, 🦦 `podman` or ☸️ `kubernetes` - Run: `hagrid launch ...` # Versions diff --git a/notebooks/api/0.8/00-load-data.ipynb b/notebooks/api/0.8/00-load-data.ipynb index ec1586da9bb..74f0eb9d10f 100644 --- a/notebooks/api/0.8/00-load-data.ipynb +++ b/notebooks/api/0.8/00-load-data.ipynb @@ -32,7 +32,7 @@ "source": [ "SYFT_VERSION = \">=0.8.2.b0,<0.9\"\n", "package_string = f'\"syft{SYFT_VERSION}\"'\n", - "# %pip install {package_string} -f https://whls.blob.core.windows.net/unstable/index.html -q" + "# %pip install {package_string} -q" ] }, { diff --git a/notebooks/api/0.8/01-submit-code.ipynb b/notebooks/api/0.8/01-submit-code.ipynb index 3850320f18e..c81d9f3383e 100644 --- a/notebooks/api/0.8/01-submit-code.ipynb +++ b/notebooks/api/0.8/01-submit-code.ipynb @@ -24,7 +24,7 @@ "source": [ "SYFT_VERSION = \">=0.8.2.b0,<0.9\"\n", "package_string = f'\"syft{SYFT_VERSION}\"'\n", - "# %pip install {package_string} -f https://whls.blob.core.windows.net/unstable/index.html -q" + "# %pip install {package_string} -q" ] }, { diff --git a/notebooks/api/0.8/02-review-code-and-approve.ipynb b/notebooks/api/0.8/02-review-code-and-approve.ipynb index d00d15ad166..9becd45b484 100644 --- a/notebooks/api/0.8/02-review-code-and-approve.ipynb +++ b/notebooks/api/0.8/02-review-code-and-approve.ipynb @@ -24,7 +24,7 @@ "source": [ "SYFT_VERSION = \">=0.8.2.b0,<0.9\"\n", "package_string = f'\"syft{SYFT_VERSION}\"'\n", - "# %pip install {package_string} -f https://whls.blob.core.windows.net/unstable/index.html -q" + "# %pip install {package_string} -q" ] }, { diff --git a/notebooks/api/0.8/03-data-scientist-download-result.ipynb b/notebooks/api/0.8/03-data-scientist-download-result.ipynb index 576badbafd8..1f05196dcc9 100644 --- a/notebooks/api/0.8/03-data-scientist-download-result.ipynb +++ b/notebooks/api/0.8/03-data-scientist-download-result.ipynb @@ -24,7 +24,7 @@ "source": [ "SYFT_VERSION = \">=0.8.2.b0,<0.9\"\n", "package_string = f'\"syft{SYFT_VERSION}\"'\n", - "# %pip install {package_string} -f https://whls.blob.core.windows.net/unstable/index.html -q" + "# %pip install {package_string} -q" ] }, { diff --git a/notebooks/api/0.8/04-jax-example.ipynb b/notebooks/api/0.8/04-jax-example.ipynb index e12bfd16897..54ff7a41eaf 100644 --- a/notebooks/api/0.8/04-jax-example.ipynb +++ b/notebooks/api/0.8/04-jax-example.ipynb @@ -11,7 +11,7 @@ "source": [ "SYFT_VERSION = \">=0.8.2.b0,<0.9\"\n", "package_string = f'\"syft{SYFT_VERSION}\"'\n", - "# %pip install {package_string} -f https://whls.blob.core.windows.net/unstable/index.html -q" + "# %pip install {package_string} -q" ] }, { diff --git a/notebooks/api/0.8/05-custom-policy.ipynb b/notebooks/api/0.8/05-custom-policy.ipynb index e837464fa34..b223311365b 100644 --- a/notebooks/api/0.8/05-custom-policy.ipynb +++ b/notebooks/api/0.8/05-custom-policy.ipynb @@ -11,7 +11,7 @@ "source": [ "SYFT_VERSION = \">=0.8.2.b0,<0.9\"\n", "package_string = f'\"syft{SYFT_VERSION}\"'\n", - "# %pip install {package_string} -f https://whls.blob.core.windows.net/unstable/index.html -q" + "# %pip install {package_string} -q" ] }, { diff --git a/notebooks/api/0.8/06-multiple-code-requests.ipynb b/notebooks/api/0.8/06-multiple-code-requests.ipynb index 89a9bb4a80b..5e498d99b1f 100644 --- a/notebooks/api/0.8/06-multiple-code-requests.ipynb +++ b/notebooks/api/0.8/06-multiple-code-requests.ipynb @@ -11,7 +11,7 @@ "source": [ "SYFT_VERSION = \">=0.8.2.b0,<0.9\"\n", "package_string = f'\"syft{SYFT_VERSION}\"'\n", - "# %pip install {package_string} -f https://whls.blob.core.windows.net/unstable/index.html -q" + "# %pip install {package_string} -q" ] }, { diff --git a/notebooks/api/0.8/07-domain-register-control-flow.ipynb b/notebooks/api/0.8/07-domain-register-control-flow.ipynb index a61d1181a3c..ff319fa8ea3 100644 --- a/notebooks/api/0.8/07-domain-register-control-flow.ipynb +++ b/notebooks/api/0.8/07-domain-register-control-flow.ipynb @@ -27,7 +27,7 @@ "source": [ "SYFT_VERSION = \">=0.8.2.b0,<0.9\"\n", "package_string = f'\"syft{SYFT_VERSION}\"'\n", - "# %pip install {package_string} -f https://whls.blob.core.windows.net/unstable/index.html -q" + "# %pip install {package_string} -q" ] }, { diff --git a/notebooks/api/0.8/08-code-version.ipynb b/notebooks/api/0.8/08-code-version.ipynb index 4fff29aaf0e..a71500ef06c 100644 --- a/notebooks/api/0.8/08-code-version.ipynb +++ b/notebooks/api/0.8/08-code-version.ipynb @@ -22,7 +22,7 @@ "source": [ "SYFT_VERSION = \">=0.8.2.b0,<0.9\"\n", "package_string = f'\"syft{SYFT_VERSION}\"'\n", - "%pip install {package_string} -f https://whls.blob.core.windows.net/unstable/index.html -q" + "%pip install {package_string} -q" ] }, { diff --git a/notebooks/api/0.8/09-blob-storage.ipynb b/notebooks/api/0.8/09-blob-storage.ipynb index 2a3cfbc78be..6f67340b608 100644 --- a/notebooks/api/0.8/09-blob-storage.ipynb +++ b/notebooks/api/0.8/09-blob-storage.ipynb @@ -8,7 +8,7 @@ "source": [ "SYFT_VERSION = \">=0.8.2.b0,<0.9\"\n", "package_string = f'\"syft{SYFT_VERSION}\"'\n", - "# %pip install {package_string} -f https://whls.blob.core.windows.net/unstable/index.html -q" + "# %pip install {package_string} -q" ] }, { diff --git a/notebooks/tutorials/data-owner/01-uploading-private-data.ipynb b/notebooks/tutorials/data-owner/01-uploading-private-data.ipynb index be631ef48f3..f63a3c81d31 100644 --- a/notebooks/tutorials/data-owner/01-uploading-private-data.ipynb +++ b/notebooks/tutorials/data-owner/01-uploading-private-data.ipynb @@ -27,7 +27,7 @@ "source": [ "SYFT_VERSION = \">=0.8.2.b0,<0.9\"\n", "package_string = f'\"syft{SYFT_VERSION}\"'\n", - "# %pip install {package_string} -f https://whls.blob.core.windows.net/unstable/index.html" + "# %pip install {package_string} -q" ] }, { diff --git a/notebooks/tutorials/data-owner/02-account-management.ipynb b/notebooks/tutorials/data-owner/02-account-management.ipynb index 0e5708baea5..7b697d1bacb 100644 --- a/notebooks/tutorials/data-owner/02-account-management.ipynb +++ b/notebooks/tutorials/data-owner/02-account-management.ipynb @@ -25,7 +25,7 @@ "source": [ "SYFT_VERSION = \">=0.8.2.b0,<0.9\"\n", "package_string = f'\"syft{SYFT_VERSION}\"'\n", - "# %pip install {package_string} -f https://whls.blob.core.windows.net/unstable/index.html" + "# %pip install {package_string} -q" ] }, { diff --git a/notebooks/tutorials/data-owner/03-messages-and-requests.ipynb b/notebooks/tutorials/data-owner/03-messages-and-requests.ipynb index 24839611c0d..9a2f97475b7 100644 --- a/notebooks/tutorials/data-owner/03-messages-and-requests.ipynb +++ b/notebooks/tutorials/data-owner/03-messages-and-requests.ipynb @@ -25,7 +25,7 @@ "source": [ "SYFT_VERSION = \">=0.8.2.b0,<0.9\"\n", "package_string = f'\"syft{SYFT_VERSION}\"'\n", - "# %pip install {package_string} -f https://whls.blob.core.windows.net/unstable/index.html" + "# %pip install {package_string} -q" ] }, { diff --git a/notebooks/tutorials/data-owner/05-syft-services-api.ipynb b/notebooks/tutorials/data-owner/05-syft-services-api.ipynb index cd6bd9970e0..522171fc455 100644 --- a/notebooks/tutorials/data-owner/05-syft-services-api.ipynb +++ b/notebooks/tutorials/data-owner/05-syft-services-api.ipynb @@ -25,7 +25,7 @@ "source": [ "SYFT_VERSION = \">=0.8.2.b0,<0.9\"\n", "package_string = f'\"syft{SYFT_VERSION}\"'\n", - "# %pip install {package_string} -f https://whls.blob.core.windows.net/unstable/index.html" + "# %pip install {package_string} -q" ] }, { diff --git a/notebooks/tutorials/data-scientist/01-installing-syft-client.ipynb b/notebooks/tutorials/data-scientist/01-installing-syft-client.ipynb index 626772a034d..04684668f9c 100644 --- a/notebooks/tutorials/data-scientist/01-installing-syft-client.ipynb +++ b/notebooks/tutorials/data-scientist/01-installing-syft-client.ipynb @@ -75,14 +75,12 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "77e1b18d", "metadata": {}, "source": [ - "`Linux`, `macOS` and `Windows` are supported.\n", - "\n", - "* `macOS` Apple Silicon users might need cmake: `brew install cmake` \n", - "* `Windows` users must run this first: `pip install jaxlib==0.4.10 -f https://whls.blob.core.windows.net/unstable/index.html`" + "`Linux`, `macOS` and `Windows` are supported." ] }, { diff --git a/notebooks/tutorials/data-scientist/03-working-with-private-datasets.ipynb b/notebooks/tutorials/data-scientist/03-working-with-private-datasets.ipynb index 341d628b167..8f046a79aaa 100644 --- a/notebooks/tutorials/data-scientist/03-working-with-private-datasets.ipynb +++ b/notebooks/tutorials/data-scientist/03-working-with-private-datasets.ipynb @@ -25,7 +25,7 @@ "source": [ "SYFT_VERSION = \">=0.8.2.b0,<0.9\"\n", "package_string = f'\"syft{SYFT_VERSION}\"'\n", - "# %pip install {package_string} -f https://whls.blob.core.windows.net/unstable/index.html" + "# %pip install {package_string} -q" ] }, { diff --git a/notebooks/tutorials/data-scientist/05-syft-functions.ipynb b/notebooks/tutorials/data-scientist/05-syft-functions.ipynb index 59605ec2e90..b88c685616a 100644 --- a/notebooks/tutorials/data-scientist/05-syft-functions.ipynb +++ b/notebooks/tutorials/data-scientist/05-syft-functions.ipynb @@ -25,7 +25,7 @@ "source": [ "SYFT_VERSION = \">=0.8.2.b0,<0.9\"\n", "package_string = f'\"syft{SYFT_VERSION}\"'\n", - "# %pip install {package_string} -f https://whls.blob.core.windows.net/unstable/index.html" + "# %pip install {package_string} -q" ] }, { @@ -198,7 +198,7 @@ "source": [ "SYFT_VERSION = \">=0.8.2.b0,<0.9\"\n", "package_string = f'\"syft{SYFT_VERSION}\"'\n", - "# %pip install {package_string} -f https://whls.blob.core.windows.net/unstable/index.html" + "# %pip install {package_string} -q" ] }, { diff --git a/notebooks/tutorials/data-scientist/06-messaging-and-requests.ipynb b/notebooks/tutorials/data-scientist/06-messaging-and-requests.ipynb index ad79bcf5681..b65fe75d404 100644 --- a/notebooks/tutorials/data-scientist/06-messaging-and-requests.ipynb +++ b/notebooks/tutorials/data-scientist/06-messaging-and-requests.ipynb @@ -25,7 +25,7 @@ "source": [ "SYFT_VERSION = \">=0.8.2.b0,<0.9\"\n", "package_string = f'\"syft{SYFT_VERSION}\"'\n", - "# %pip install {package_string} -f https://whls.blob.core.windows.net/unstable/index.html" + "# %pip install {package_string} -q" ] }, { diff --git a/notebooks/tutorials/hello-syft/01-hello-syft.ipynb b/notebooks/tutorials/hello-syft/01-hello-syft.ipynb index 430c7d2de6c..01f89edc93f 100644 --- a/notebooks/tutorials/hello-syft/01-hello-syft.ipynb +++ b/notebooks/tutorials/hello-syft/01-hello-syft.ipynb @@ -58,7 +58,7 @@ "source": [ "SYFT_VERSION = \">=0.8.2.b0,<0.9\"\n", "package_string = f'\"syft{SYFT_VERSION}\"'\n", - "# %pip install {package_string} -f https://whls.blob.core.windows.net/unstable/index.html" + "# %pip install {package_string} -q" ] }, { diff --git a/notebooks/tutorials/model-auditing/colab/01-user-log.ipynb b/notebooks/tutorials/model-auditing/colab/01-user-log.ipynb index 01fc291670c..4620c220e86 100644 --- a/notebooks/tutorials/model-auditing/colab/01-user-log.ipynb +++ b/notebooks/tutorials/model-auditing/colab/01-user-log.ipynb @@ -46,7 +46,7 @@ "# install syft\n", "SYFT_VERSION = \">=0.8.2.b0,<0.9\"\n", "package_string = f'\"syft{SYFT_VERSION}\"'\n", - "%pip install {package_string} -f https://whls.blob.core.windows.net/unstable/index.html -q" + "%pip install {package_string} -q" ] }, { diff --git a/notebooks/tutorials/pandas-cookbook/01-reading-from-a-csv.ipynb b/notebooks/tutorials/pandas-cookbook/01-reading-from-a-csv.ipynb index 7f0c1695184..ce844ee7f47 100644 --- a/notebooks/tutorials/pandas-cookbook/01-reading-from-a-csv.ipynb +++ b/notebooks/tutorials/pandas-cookbook/01-reading-from-a-csv.ipynb @@ -27,7 +27,7 @@ "source": [ "SYFT_VERSION = \">=0.8.2.b0,<0.9\"\n", "package_string = f'\"syft{SYFT_VERSION}\"'\n", - "# %pip install {package_string} -f https://whls.blob.core.windows.net/unstable/index.html" + "# %pip install {package_string} -q" ] }, { diff --git a/notebooks/tutorials/pandas-cookbook/02-selecting-data-finding-common-complain.ipynb b/notebooks/tutorials/pandas-cookbook/02-selecting-data-finding-common-complain.ipynb index 51b948a6de2..2b75c070ea3 100644 --- a/notebooks/tutorials/pandas-cookbook/02-selecting-data-finding-common-complain.ipynb +++ b/notebooks/tutorials/pandas-cookbook/02-selecting-data-finding-common-complain.ipynb @@ -27,7 +27,7 @@ "source": [ "SYFT_VERSION = \">=0.8.2.b0,<0.9\"\n", "package_string = f'\"syft{SYFT_VERSION}\"'\n", - "# %pip install {package_string} -f https://whls.blob.core.windows.net/unstable/index.html -q" + "# %pip install {package_string} -q" ] }, { diff --git a/notebooks/tutorials/pandas-cookbook/03-which-borough-has-the-most-noise-complaints.ipynb b/notebooks/tutorials/pandas-cookbook/03-which-borough-has-the-most-noise-complaints.ipynb index bb80d83dcbf..2f3e20955be 100644 --- a/notebooks/tutorials/pandas-cookbook/03-which-borough-has-the-most-noise-complaints.ipynb +++ b/notebooks/tutorials/pandas-cookbook/03-which-borough-has-the-most-noise-complaints.ipynb @@ -27,7 +27,7 @@ "source": [ "SYFT_VERSION = \">=0.8.2.b0,<0.9\"\n", "package_string = f'\"syft{SYFT_VERSION}\"'\n", - "# %pip install {package_string} -f https://whls.blob.core.windows.net/unstable/index.html -q" + "# %pip install {package_string} -q" ] }, { diff --git a/notebooks/tutorials/pandas-cookbook/04-weekday-bike-most-groupby-aggregate.ipynb b/notebooks/tutorials/pandas-cookbook/04-weekday-bike-most-groupby-aggregate.ipynb index 2e3683cd564..ed59b274c64 100644 --- a/notebooks/tutorials/pandas-cookbook/04-weekday-bike-most-groupby-aggregate.ipynb +++ b/notebooks/tutorials/pandas-cookbook/04-weekday-bike-most-groupby-aggregate.ipynb @@ -19,7 +19,7 @@ "source": [ "SYFT_VERSION = \">=0.8.2.b0,<0.9\"\n", "package_string = f'\"syft{SYFT_VERSION}\"'\n", - "# %pip install {package_string} -f https://whls.blob.core.windows.net/unstable/index.html -q" + "# %pip install {package_string} -q" ] }, { diff --git a/notebooks/tutorials/pandas-cookbook/05-combining-dataframes-scraping-weather-data.ipynb b/notebooks/tutorials/pandas-cookbook/05-combining-dataframes-scraping-weather-data.ipynb index 54c8b8a2240..1fc3212aaa2 100644 --- a/notebooks/tutorials/pandas-cookbook/05-combining-dataframes-scraping-weather-data.ipynb +++ b/notebooks/tutorials/pandas-cookbook/05-combining-dataframes-scraping-weather-data.ipynb @@ -27,7 +27,7 @@ "source": [ "SYFT_VERSION = \">=0.8.2.b0,<0.9\"\n", "package_string = f'\"syft{SYFT_VERSION}\"'\n", - "# %pip install {package_string} -f https://whls.blob.core.windows.net/unstable/index.html -q" + "# %pip install {package_string} -q" ] }, { diff --git a/notebooks/tutorials/pandas-cookbook/06-string-operations-which-month-was-the-snowiest.ipynb b/notebooks/tutorials/pandas-cookbook/06-string-operations-which-month-was-the-snowiest.ipynb index 3794877ab03..0a639bcb2b2 100644 --- a/notebooks/tutorials/pandas-cookbook/06-string-operations-which-month-was-the-snowiest.ipynb +++ b/notebooks/tutorials/pandas-cookbook/06-string-operations-which-month-was-the-snowiest.ipynb @@ -27,7 +27,7 @@ "source": [ "SYFT_VERSION = \">=0.8.2.b0,<0.9\"\n", "package_string = f'\"syft{SYFT_VERSION}\"'\n", - "# %pip install {package_string} -f https://whls.blob.core.windows.net/unstable/index.html -q" + "# %pip install {package_string} -q" ] }, { diff --git a/notebooks/tutorials/pandas-cookbook/07-cleaning-up-messy-data.ipynb b/notebooks/tutorials/pandas-cookbook/07-cleaning-up-messy-data.ipynb index 0a4b03f0378..92490b2ba40 100644 --- a/notebooks/tutorials/pandas-cookbook/07-cleaning-up-messy-data.ipynb +++ b/notebooks/tutorials/pandas-cookbook/07-cleaning-up-messy-data.ipynb @@ -27,7 +27,7 @@ "source": [ "SYFT_VERSION = \">=0.8.2.b0,<0.9\"\n", "package_string = f'\"syft{SYFT_VERSION}\"'\n", - "# %pip install {package_string} -f https://whls.blob.core.windows.net/unstable/index.html -q" + "# %pip install {package_string} -q" ] }, { diff --git a/notebooks/tutorials/pandas-cookbook/08-how-to-deal-with-timestamps.ipynb b/notebooks/tutorials/pandas-cookbook/08-how-to-deal-with-timestamps.ipynb index f6afc36cb88..60387e53d39 100644 --- a/notebooks/tutorials/pandas-cookbook/08-how-to-deal-with-timestamps.ipynb +++ b/notebooks/tutorials/pandas-cookbook/08-how-to-deal-with-timestamps.ipynb @@ -29,7 +29,7 @@ "source": [ "SYFT_VERSION = \">=0.8.2.b0,<0.9\"\n", "package_string = f'\"syft{SYFT_VERSION}\"'\n", - "# %pip install {package_string} -f https://whls.blob.core.windows.net/unstable/index.html -q" + "# %pip install {package_string} -q" ] }, { diff --git a/packages/hagrid/hagrid/deps.py b/packages/hagrid/hagrid/deps.py index 39113c2b6e5..bc67e263829 100644 --- a/packages/hagrid/hagrid/deps.py +++ b/packages/hagrid/hagrid/deps.py @@ -114,8 +114,7 @@ class DependencySyftOS(Dependency): def check(self) -> None: self.display = "✅ " + ENVIRONMENT["os"] if is_windows(): - if not get_pip_package("jaxlib"): - self.issues.append(windows_jaxlib()) + pass elif is_apple_silicon(): pass @@ -918,15 +917,3 @@ def python_version_unsupported() -> SetupIssue: command="", solution="You must install a compatible version of Python", ) - - -WINDOWS_JAXLIB_REPO = "https://whls.blob.core.windows.net/unstable/index.html" - - -def windows_jaxlib() -> SetupIssue: - return SetupIssue( - issue_name="windows_jaxlib", - description="Windows Python Wheels for Jax are not available on PyPI yet", - command=f"pip install jaxlib==0.4.10 -f {WINDOWS_JAXLIB_REPO}", - solution="Windows users must install jaxlib before syft", - ) diff --git a/packages/syft/setup.cfg b/packages/syft/setup.cfg index 87de753c800..820442c58ae 100644 --- a/packages/syft/setup.cfg +++ b/packages/syft/setup.cfg @@ -30,8 +30,8 @@ syft = forbiddenfruit==0.1.4 gevent==22.10.2 gipc==1.5.0 - jax==0.4.10 - jaxlib==0.4.10 + jax==0.4.14 + jaxlib==0.4.14 loguru==0.7.0 networkx==2.8 numpy>=1.22.4,<=1.24.3 diff --git a/tox.ini b/tox.ini index 9b2eaee3479..ca9dc00de47 100644 --- a/tox.ini +++ b/tox.ini @@ -401,7 +401,6 @@ setenv = ENABLE_SIGNUP=True commands = pip install oblv-ctl==0.3.1 - python -c "import platform; import os; os.system('pip install jaxlib==0.4.10 -f https://whls.blob.core.windows.net/unstable/index.html') if platform.system().lower() == 'windows' else ''" # run at start to kill any process started beforehand bash -c 'chmod +x scripts/kill_process_in_port.sh && ./scripts/kill_process_in_port.sh $LOCAL_ENCLAVE_PORT' From acf09b1fc243bf508906699af676ef3a1c160574 Mon Sep 17 00:00:00 2001 From: Koen van der Veen Date: Fri, 1 Sep 2023 11:01:55 +0200 Subject: [PATCH 16/24] - --- packages/syft/src/syft/store/mongo_document_store.py | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/syft/src/syft/store/mongo_document_store.py b/packages/syft/src/syft/store/mongo_document_store.py index eb1e7ab5ffc..03df117b90a 100644 --- a/packages/syft/src/syft/store/mongo_document_store.py +++ b/packages/syft/src/syft/store/mongo_document_store.py @@ -147,6 +147,7 @@ def init_store(self) -> Result[Ok, Err]: return self._create_update_index() # Potentially thread-unsafe methods. + # # CAUTION: # * Don't use self.lock here. # * Do not call the public thread-safe methods here(with locking). From debe29b60826fe8fe59b7525541d1617dcd0f913 Mon Sep 17 00:00:00 2001 From: khoaguin Date: Fri, 1 Sep 2023 16:07:50 +0700 Subject: [PATCH 17/24] add type `MongoCollection` for the `collection` variable for easier read and debug) --- packages/syft/src/syft/store/mongo_document_store.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/syft/src/syft/store/mongo_document_store.py b/packages/syft/src/syft/store/mongo_document_store.py index eb1e7ab5ffc..3d5e4fe9cc0 100644 --- a/packages/syft/src/syft/store/mongo_document_store.py +++ b/packages/syft/src/syft/store/mongo_document_store.py @@ -157,7 +157,7 @@ def _create_update_index(self) -> Result[Ok, Err]: collection_status = self.collection if collection_status.is_err(): return collection_status - collection = collection_status.ok() + collection: MongoCollection = collection_status.ok() def check_index_keys(current_keys, new_index_keys): current_keys.sort() @@ -237,7 +237,7 @@ def _set( collection_status = self.collection if collection_status.is_err(): return collection_status - collection = collection_status.ok() + collection: MongoCollection = collection_status.ok() store_key_exists = ( collection.find_one({"_id": store_query_key.value}) is not None @@ -283,7 +283,7 @@ def _update( collection_status = self.collection if collection_status.is_err(): return collection_status - collection = collection_status.ok() + collection: MongoCollection = collection_status.ok() # TODO: optimize the update. The ID should not be overwritten, # but the qk doesn't necessarily have to include the `id` field either. @@ -346,7 +346,7 @@ def _get_all_from_store( collection_status = self.collection if collection_status.is_err(): return collection_status - collection = collection_status.ok() + collection: MongoCollection = collection_status.ok() if order_by is not None: storage_objs = collection.find(filter=qks.as_dict_mongo).sort(order_by.key) @@ -372,7 +372,7 @@ def _delete( collection_status = self.collection if collection_status.is_err(): return collection_status - collection = collection_status.ok() + collection: MongoCollection = collection_status.ok() if has_permission or self.has_permission( ActionObjectWRITE(uid=qk.value, credentials=credentials) @@ -516,7 +516,7 @@ def __len__(self): collection_status = self.collection if collection_status.is_err(): return 0 - collection = collection_status.ok() + collection: MongoCollection = collection_status.ok() return collection.count_documents(filter={}) From 6b5cc8e70c46e6564e53b2d988a774b2030b7f21 Mon Sep 17 00:00:00 2001 From: Shubham Gupta Date: Fri, 1 Sep 2023 15:47:24 +0530 Subject: [PATCH 18/24] update to use store_query_key.as_dict_mongo --- packages/syft/src/syft/store/mongo_document_store.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/syft/src/syft/store/mongo_document_store.py b/packages/syft/src/syft/store/mongo_document_store.py index a58beb21ef4..71df2ec64a2 100644 --- a/packages/syft/src/syft/store/mongo_document_store.py +++ b/packages/syft/src/syft/store/mongo_document_store.py @@ -241,7 +241,7 @@ def _set( collection: MongoCollection = collection_status.ok() store_key_exists = ( - collection.find_one({"_id": store_query_key.value}) is not None + collection.find_one(store_query_key.as_dict_mongo) is not None ) if not store_key_exists: From a914c87fe7ba2ddf0eb43463fc95baf4b20144df Mon Sep 17 00:00:00 2001 From: Koen van der Veen Date: Fri, 1 Sep 2023 16:01:50 +0200 Subject: [PATCH 19/24] check for uniqueness instead of relying on mongo to ignore errors --- .../syft/src/syft/store/kv_document_store.py | 4 +-- .../src/syft/store/mongo_document_store.py | 33 ++++++++++++------- 2 files changed, 24 insertions(+), 13 deletions(-) diff --git a/packages/syft/src/syft/store/kv_document_store.py b/packages/syft/src/syft/store/kv_document_store.py index 8ba859c9a48..2c280c443d5 100644 --- a/packages/syft/src/syft/store/kv_document_store.py +++ b/packages/syft/src/syft/store/kv_document_store.py @@ -176,11 +176,11 @@ def _set( try: if obj.id is None: obj.id = UID() - store_query_key = self.settings.store_key.with_obj(obj) + store_query_key: QueryKey = self.settings.store_key.with_obj(obj) uid = store_query_key.value write_permission = ActionObjectWRITE(uid=uid, credentials=credentials) can_write = self.has_permission(write_permission) - unique_query_keys = self.settings.unique_keys.with_obj(obj) + unique_query_keys: QueryKeys = self.settings.unique_keys.with_obj(obj) store_key_exists = store_query_key.value in self.data searchable_query_keys = self.settings.searchable_keys.with_obj(obj) diff --git a/packages/syft/src/syft/store/mongo_document_store.py b/packages/syft/src/syft/store/mongo_document_store.py index 03df117b90a..2a5258bfdd8 100644 --- a/packages/syft/src/syft/store/mongo_document_store.py +++ b/packages/syft/src/syft/store/mongo_document_store.py @@ -7,9 +7,7 @@ # third party from pymongo import ASCENDING -from pymongo import WriteConcern from pymongo.collection import Collection as MongoCollection -from pymongo.errors import DuplicateKeyError from result import Err from result import Ok from result import Result @@ -234,7 +232,7 @@ def _set( write_permission = ActionObjectWRITE(uid=obj.id, credentials=credentials) can_write = self.has_permission(write_permission) - store_query_key = self.settings.store_key.with_obj(obj) + store_query_key: QueryKey = self.settings.store_key.with_obj(obj) collection_status = self.collection if collection_status.is_err(): return collection_status @@ -243,21 +241,26 @@ def _set( store_key_exists = ( collection.find_one({"_id": store_query_key.value}) is not None ) - - if not store_key_exists: + if (not store_key_exists) and (not self.item_keys_exist(obj, collection)): # attempt to claim ownership for writing ownership_result = self.take_ownership(uid=obj.id, credentials=credentials) can_write: bool = ownership_result.is_ok() + elif not ignore_duplicates: + unique_query_keys: QueryKeys = self.settings.unique_keys.with_obj(obj) + keys = ", ".join(f"`{key.key}`" for key in unique_query_keys.all) + return Err( + f"Duplication Key Error for {obj}.\n" + f"The fields that should be unique are {keys}." + ) + else: + # we are not throwing an error, because we are ignoring duplicates + # we are also not writing though + return Ok(obj) if can_write: storage_obj = obj.to(self.storage_type) - if ignore_duplicates: - collection = collection.with_options(write_concern=WriteConcern(w=0)) - try: - collection.insert_one(storage_obj) - except DuplicateKeyError as e: - return Err(f"Duplicate Key Error for {obj}: {e}") + collection.insert_one(storage_obj) # adding permissions read_permission = ActionObjectPermission( @@ -274,6 +277,14 @@ def _set( else: return Err(f"No permission to write object with id {obj.id}") + def item_keys_exist(self, obj, collection): + qks: QueryKeys = self.settings.unique_keys.with_obj(obj) + query = {x.key: x.value for x in qks.qks} + if "id" in query: + query["_id"] = query.pop("id") + res = collection.find_one(query) + return res is not None + def _update( self, credentials: SyftVerifyKey, From ef6e9adb58b7a2d68ef5f41b61ae0d237f36e5be Mon Sep 17 00:00:00 2001 From: Madhava Jay Date: Sun, 3 Sep 2023 10:22:18 +0000 Subject: [PATCH 20/24] bump version --- packages/hagrid/.bumpversion.cfg | 2 +- packages/hagrid/hagrid/manifest_template.yml | 4 ++-- packages/hagrid/hagrid/version.py | 2 +- packages/hagrid/setup.py | 2 +- scripts/hagrid_hash | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/hagrid/.bumpversion.cfg b/packages/hagrid/.bumpversion.cfg index 451adb61971..9d38890f4f1 100644 --- a/packages/hagrid/.bumpversion.cfg +++ b/packages/hagrid/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.3.70 +current_version = 0.3.71 tag = False tag_name = {new_version} commit = True diff --git a/packages/hagrid/hagrid/manifest_template.yml b/packages/hagrid/hagrid/manifest_template.yml index b6ad753169a..fc14dd4ce38 100644 --- a/packages/hagrid/hagrid/manifest_template.yml +++ b/packages/hagrid/hagrid/manifest_template.yml @@ -1,9 +1,9 @@ manifestVersion: 0.1 -hagrid_version: 0.3.70 +hagrid_version: 0.3.71 syft_version: 0.8.2-beta.27 dockerTag: 0.8.2-beta.27 baseUrl: https://raw.githubusercontent.com/OpenMined/PySyft/ -hash: 576bd08c2a99e17ac2907433fd6dc3a3030136f5 +hash: 663166c61b33dfe443add9367ca84dc4c3c84ce6 target_dir: ~/.hagrid/PySyft/ files: grid: diff --git a/packages/hagrid/hagrid/version.py b/packages/hagrid/hagrid/version.py index a02282ca438..5c26289f637 100644 --- a/packages/hagrid/hagrid/version.py +++ b/packages/hagrid/hagrid/version.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # HAGrid Version -__version__ = "0.3.70" +__version__ = "0.3.71" if __name__ == "__main__": print(__version__) diff --git a/packages/hagrid/setup.py b/packages/hagrid/setup.py index 7a50a69d26d..22eb365fdf6 100644 --- a/packages/hagrid/setup.py +++ b/packages/hagrid/setup.py @@ -5,7 +5,7 @@ from setuptools import find_packages from setuptools import setup -__version__ = "0.3.70" +__version__ = "0.3.71" DATA_FILES = {"img": ["hagrid/img/*.png"], "hagrid": ["*.yml"]} diff --git a/scripts/hagrid_hash b/scripts/hagrid_hash index 20384883944..ba276c38159 100644 --- a/scripts/hagrid_hash +++ b/scripts/hagrid_hash @@ -1 +1 @@ -3604d501ca849b320a73cbc6fc66c282 +e32f2c4364e17407a56a8cf9fb828d5e From cee4d51fe72be4adaeeabde4cde3a836260f358c Mon Sep 17 00:00:00 2001 From: Madhava Jay Date: Sun, 3 Sep 2023 12:23:40 +0000 Subject: [PATCH 21/24] bump version --- .bumpversion.cfg | 2 +- VERSION | 2 +- packages/grid/VERSION | 2 +- packages/grid/devspace.yaml | 4 +- packages/grid/frontend/package.json | 2 +- packages/grid/helm/repo/index.yaml | 84 +++++++++++------- .../grid/helm/repo/syft-0.8.2-beta.28.tgz | Bin 0 -> 7904 bytes packages/grid/helm/syft/Chart.yaml | 4 +- .../podman/podman-kube/podman-syft-kube.yaml | 4 +- packages/hagrid/hagrid/deps.py | 2 +- packages/hagrid/hagrid/manifest_template.yml | 6 +- packages/syft/setup.cfg | 2 +- packages/syft/src/syft/VERSION | 2 +- packages/syft/src/syft/__init__.py | 2 +- packages/syftcli/manifest.yml | 8 +- 15 files changed, 71 insertions(+), 55 deletions(-) create mode 100644 packages/grid/helm/repo/syft-0.8.2-beta.28.tgz diff --git a/.bumpversion.cfg b/.bumpversion.cfg index e6051cb595f..474ab191d46 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.8.2-beta.27 +current_version = 0.8.2-beta.28 tag = False tag_name = {new_version} commit = True diff --git a/VERSION b/VERSION index 6d7567fd24a..7f3f0571209 100644 --- a/VERSION +++ b/VERSION @@ -1,5 +1,5 @@ # Mono Repo Global Version -__version__ = "0.8.2-beta.27" +__version__ = "0.8.2-beta.28" # elsewhere we can call this file: `python VERSION` and simply take the stdout # stdlib diff --git a/packages/grid/VERSION b/packages/grid/VERSION index 6d7567fd24a..7f3f0571209 100644 --- a/packages/grid/VERSION +++ b/packages/grid/VERSION @@ -1,5 +1,5 @@ # Mono Repo Global Version -__version__ = "0.8.2-beta.27" +__version__ = "0.8.2-beta.28" # elsewhere we can call this file: `python VERSION` and simply take the stdout # stdlib diff --git a/packages/grid/devspace.yaml b/packages/grid/devspace.yaml index 10f8f5a992d..316ba1e08c2 100644 --- a/packages/grid/devspace.yaml +++ b/packages/grid/devspace.yaml @@ -15,13 +15,13 @@ pipelines: run: |- run_dependencies --all ensure_pull_secrets --all - build_images --all -t $(git rev-parse --short=6 HEAD) -t 0.8.2-beta.27 -t dev-latest + build_images --all -t $(git rev-parse --short=6 HEAD) -t 0.8.2-beta.28 -t dev-latest create_deployments --all vars: DEVSPACE_ENV_FILE: "default.env" CONTAINER_REGISTRY: "docker.io/" - VERSION: "0.8.2-beta.27" + VERSION: "0.8.2-beta.28" # This is a list of `images` that DevSpace can build for this project # We recommend to skip image building during development (devspace dev) as much as possible diff --git a/packages/grid/frontend/package.json b/packages/grid/frontend/package.json index edd811bd419..05598895966 100644 --- a/packages/grid/frontend/package.json +++ b/packages/grid/frontend/package.json @@ -1,6 +1,6 @@ { "name": "pygrid-ui", - "version": "0.8.2-beta.27", + "version": "0.8.2-beta.28", "private": true, "scripts": { "dev": "pnpm i && vite dev --host --port 80", diff --git a/packages/grid/helm/repo/index.yaml b/packages/grid/helm/repo/index.yaml index f5e59383d29..693eed425c3 100644 --- a/packages/grid/helm/repo/index.yaml +++ b/packages/grid/helm/repo/index.yaml @@ -1,9 +1,25 @@ apiVersion: v1 entries: syft: + - apiVersion: v2 + appVersion: 0.8.2-beta.28 + created: "2023-09-03T12:23:17.826816314Z" + dependencies: + - name: component-chart + repository: https://charts.devspace.sh + version: 0.8.6 + description: Perform numpy-like analysis on data that remains in someone elses + server + digest: 50a697c502634565c0f5bbe219173e5d3ac7dbe02adccfd62a32732be7824528 + icon: https://raw.githubusercontent.com/OpenMined/PySyft/dev/docs/img/title_syft_light.png + name: syft + type: application + urls: + - https://openmined.github.io/PySyft/helm/syft-0.8.2-beta.28.tgz + version: 0.8.2-beta.28 - apiVersion: v2 appVersion: 0.8.2-beta.27 - created: "2023-08-31T07:12:34.862061012Z" + created: "2023-09-03T12:23:17.826302845Z" dependencies: - name: component-chart repository: https://charts.devspace.sh @@ -19,7 +35,7 @@ entries: version: 0.8.2-beta.27 - apiVersion: v2 appVersion: 0.8.2-beta.26 - created: "2023-08-31T07:12:34.861575787Z" + created: "2023-09-03T12:23:17.825676526Z" dependencies: - name: component-chart repository: https://charts.devspace.sh @@ -35,7 +51,7 @@ entries: version: 0.8.2-beta.26 - apiVersion: v2 appVersion: 0.8.2-beta.25 - created: "2023-08-31T07:12:34.861095721Z" + created: "2023-09-03T12:23:17.824574854Z" dependencies: - name: component-chart repository: https://charts.devspace.sh @@ -51,7 +67,7 @@ entries: version: 0.8.2-beta.25 - apiVersion: v2 appVersion: 0.8.2-beta.24 - created: "2023-08-31T07:12:34.86059213Z" + created: "2023-09-03T12:23:17.824065754Z" dependencies: - name: component-chart repository: https://charts.devspace.sh @@ -67,7 +83,7 @@ entries: version: 0.8.2-beta.24 - apiVersion: v2 appVersion: 0.8.2-beta.23 - created: "2023-08-31T07:12:34.860110001Z" + created: "2023-09-03T12:23:17.823578334Z" dependencies: - name: component-chart repository: https://charts.devspace.sh @@ -83,7 +99,7 @@ entries: version: 0.8.2-beta.23 - apiVersion: v2 appVersion: 0.8.2-beta.22 - created: "2023-08-31T07:12:34.859620788Z" + created: "2023-09-03T12:23:17.823030542Z" dependencies: - name: component-chart repository: https://charts.devspace.sh @@ -99,7 +115,7 @@ entries: version: 0.8.2-beta.22 - apiVersion: v2 appVersion: 0.8.2-beta.21 - created: "2023-08-31T07:12:34.859134099Z" + created: "2023-09-03T12:23:17.822536359Z" dependencies: - name: component-chart repository: https://charts.devspace.sh @@ -115,7 +131,7 @@ entries: version: 0.8.2-beta.21 - apiVersion: v2 appVersion: 0.8.2-beta.20 - created: "2023-08-31T07:12:34.858640658Z" + created: "2023-09-03T12:23:17.822051103Z" dependencies: - name: component-chart repository: https://charts.devspace.sh @@ -131,7 +147,7 @@ entries: version: 0.8.2-beta.20 - apiVersion: v2 appVersion: 0.8.2-beta.19 - created: "2023-08-31T07:12:34.857651111Z" + created: "2023-09-03T12:23:17.821044815Z" dependencies: - name: component-chart repository: https://charts.devspace.sh @@ -147,7 +163,7 @@ entries: version: 0.8.2-beta.19 - apiVersion: v2 appVersion: 0.8.2-beta.18 - created: "2023-08-31T07:12:34.857062963Z" + created: "2023-09-03T12:23:17.82052784Z" dependencies: - name: component-chart repository: https://charts.devspace.sh @@ -163,7 +179,7 @@ entries: version: 0.8.2-beta.18 - apiVersion: v2 appVersion: 0.8.2-beta.17 - created: "2023-08-31T07:12:34.856033093Z" + created: "2023-09-03T12:23:17.820034419Z" dependencies: - name: component-chart repository: https://charts.devspace.sh @@ -179,7 +195,7 @@ entries: version: 0.8.2-beta.17 - apiVersion: v2 appVersion: 0.8.2-beta.16 - created: "2023-08-31T07:12:34.855436259Z" + created: "2023-09-03T12:23:17.819535759Z" dependencies: - name: component-chart repository: https://charts.devspace.sh @@ -195,7 +211,7 @@ entries: version: 0.8.2-beta.16 - apiVersion: v2 appVersion: 0.8.2-beta.15 - created: "2023-08-31T07:12:34.854858521Z" + created: "2023-09-03T12:23:17.819006741Z" dependencies: - name: component-chart repository: https://charts.devspace.sh @@ -211,7 +227,7 @@ entries: version: 0.8.2-beta.15 - apiVersion: v2 appVersion: 0.8.2-beta.14 - created: "2023-08-31T07:12:34.854365771Z" + created: "2023-09-03T12:23:17.817810804Z" dependencies: - name: component-chart repository: https://charts.devspace.sh @@ -227,7 +243,7 @@ entries: version: 0.8.2-beta.14 - apiVersion: v2 appVersion: 0.8.2-beta.13 - created: "2023-08-31T07:12:34.85387788Z" + created: "2023-09-03T12:23:17.817290573Z" dependencies: - name: component-chart repository: https://charts.devspace.sh @@ -243,7 +259,7 @@ entries: version: 0.8.2-beta.13 - apiVersion: v2 appVersion: 0.8.2-beta.12 - created: "2023-08-31T07:12:34.853369431Z" + created: "2023-09-03T12:23:17.816784779Z" dependencies: - name: component-chart repository: https://charts.devspace.sh @@ -259,7 +275,7 @@ entries: version: 0.8.2-beta.12 - apiVersion: v2 appVersion: 0.8.2-beta.11 - created: "2023-08-31T07:12:34.852852647Z" + created: "2023-09-03T12:23:17.816264829Z" dependencies: - name: component-chart repository: https://charts.devspace.sh @@ -275,7 +291,7 @@ entries: version: 0.8.2-beta.11 - apiVersion: v2 appVersion: 0.8.2-beta.10 - created: "2023-08-31T07:12:34.852290848Z" + created: "2023-09-03T12:23:17.815782589Z" dependencies: - name: component-chart repository: https://charts.devspace.sh @@ -291,7 +307,7 @@ entries: version: 0.8.2-beta.10 - apiVersion: v2 appVersion: 0.8.2-beta.9 - created: "2023-08-31T07:12:34.866122593Z" + created: "2023-09-03T12:23:17.830241697Z" dependencies: - name: component-chart repository: https://charts.devspace.sh @@ -307,7 +323,7 @@ entries: version: 0.8.2-beta.9 - apiVersion: v2 appVersion: 0.8.2-beta.8 - created: "2023-08-31T07:12:34.865639572Z" + created: "2023-09-03T12:23:17.829757033Z" dependencies: - name: component-chart repository: https://charts.devspace.sh @@ -323,7 +339,7 @@ entries: version: 0.8.2-beta.8 - apiVersion: v2 appVersion: 0.8.2-beta.7 - created: "2023-08-31T07:12:34.865154998Z" + created: "2023-09-03T12:23:17.829269984Z" dependencies: - name: component-chart repository: https://charts.devspace.sh @@ -339,7 +355,7 @@ entries: version: 0.8.2-beta.7 - apiVersion: v2 appVersion: 0.8.2-beta.6 - created: "2023-08-31T07:12:34.864632712Z" + created: "2023-09-03T12:23:17.828780129Z" dependencies: - name: component-chart repository: https://charts.devspace.sh @@ -355,7 +371,7 @@ entries: version: 0.8.2-beta.6 - apiVersion: v2 appVersion: 0.8.2-beta.5 - created: "2023-08-31T07:12:34.86414901Z" + created: "2023-09-03T12:23:17.828275287Z" dependencies: - name: component-chart repository: https://charts.devspace.sh @@ -371,7 +387,7 @@ entries: version: 0.8.2-beta.5 - apiVersion: v2 appVersion: 0.8.2-beta.4 - created: "2023-08-31T07:12:34.863648596Z" + created: "2023-09-03T12:23:17.827795101Z" dependencies: - name: component-chart repository: https://charts.devspace.sh @@ -387,7 +403,7 @@ entries: version: 0.8.2-beta.4 - apiVersion: v2 appVersion: 0.8.2-beta.3 - created: "2023-08-31T07:12:34.863068824Z" + created: "2023-09-03T12:23:17.827308643Z" dependencies: - name: component-chart repository: https://charts.devspace.sh @@ -403,7 +419,7 @@ entries: version: 0.8.2-beta.3 - apiVersion: v2 appVersion: 0.8.2-beta.2 - created: "2023-08-31T07:12:34.858153108Z" + created: "2023-09-03T12:23:17.821559626Z" dependencies: - name: component-chart repository: https://charts.devspace.sh @@ -419,7 +435,7 @@ entries: version: 0.8.2-beta.2 - apiVersion: v2 appVersion: 0.8.2-beta.1 - created: "2023-08-31T07:12:34.851802747Z" + created: "2023-09-03T12:23:17.815288356Z" dependencies: - name: component-chart repository: https://charts.devspace.sh @@ -435,7 +451,7 @@ entries: version: 0.8.2-beta.1 - apiVersion: v2 appVersion: 0.8.1 - created: "2023-08-31T07:12:34.851269482Z" + created: "2023-09-03T12:23:17.814780388Z" dependencies: - name: component-chart repository: https://charts.devspace.sh @@ -451,7 +467,7 @@ entries: version: 0.8.1 - apiVersion: v2 appVersion: 0.8.1-beta.21 - created: "2023-08-31T07:12:34.850723693Z" + created: "2023-09-03T12:23:17.814274774Z" dependencies: - name: component-chart repository: https://charts.devspace.sh @@ -467,7 +483,7 @@ entries: version: 0.8.1-beta.21 - apiVersion: v2 appVersion: 0.8.1-beta.20 - created: "2023-08-31T07:12:34.849615675Z" + created: "2023-09-03T12:23:17.813750626Z" dependencies: - name: component-chart repository: https://charts.devspace.sh @@ -483,7 +499,7 @@ entries: version: 0.8.1-beta.20 - apiVersion: v2 appVersion: 0.8.1-beta.19 - created: "2023-08-31T07:12:34.849107276Z" + created: "2023-09-03T12:23:17.813243639Z" dependencies: - name: component-chart repository: https://charts.devspace.sh @@ -499,7 +515,7 @@ entries: version: 0.8.1-beta.19 - apiVersion: v2 appVersion: 0.8.1-beta.15 - created: "2023-08-31T07:12:34.848542292Z" + created: "2023-09-03T12:23:17.81256905Z" dependencies: - name: component-chart repository: https://charts.devspace.sh @@ -515,7 +531,7 @@ entries: version: 0.8.1-beta.15 - apiVersion: v2 appVersion: 0.8.1-beta.12 - created: "2023-08-31T07:12:34.848012673Z" + created: "2023-09-03T12:23:17.811439955Z" dependencies: - name: component-chart repository: https://charts.devspace.sh @@ -529,4 +545,4 @@ entries: urls: - https://openmined.github.io/PySyft/helm/syft-0.8.1-beta.12.tgz version: 0.8.1-beta.12 -generated: "2023-08-31T07:12:34.847327845Z" +generated: "2023-09-03T12:23:17.81059586Z" diff --git a/packages/grid/helm/repo/syft-0.8.2-beta.28.tgz b/packages/grid/helm/repo/syft-0.8.2-beta.28.tgz new file mode 100644 index 0000000000000000000000000000000000000000..3ae3b6f45713e472a80b51ddf17922facded0646 GIT binary patch literal 7904 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 Kee^Q`1OWhzFKIIX literal 0 HcmV?d00001 diff --git a/packages/grid/helm/syft/Chart.yaml b/packages/grid/helm/syft/Chart.yaml index 1b525f84584..a577377db2a 100644 --- a/packages/grid/helm/syft/Chart.yaml +++ b/packages/grid/helm/syft/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: syft description: Perform numpy-like analysis on data that remains in someone elses server type: application -version: "0.8.2-beta.27" -appVersion: "0.8.2-beta.27" +version: "0.8.2-beta.28" +appVersion: "0.8.2-beta.28" icon: https://raw.githubusercontent.com/OpenMined/PySyft/dev/docs/img/title_syft_light.png dependencies: diff --git a/packages/grid/podman/podman-kube/podman-syft-kube.yaml b/packages/grid/podman/podman-kube/podman-syft-kube.yaml index 930b773fcf6..36fd43113d7 100644 --- a/packages/grid/podman/podman-kube/podman-syft-kube.yaml +++ b/packages/grid/podman/podman-kube/podman-syft-kube.yaml @@ -41,7 +41,7 @@ spec: - configMapRef: name: podman-syft-config - image: docker.io/openmined/grid-backend:0.8.2-beta.27 + image: docker.io/openmined/grid-backend:0.8.2-beta.28 imagePullPolicy: IfNotPresent resources: {} tty: true @@ -57,7 +57,7 @@ spec: envFrom: - configMapRef: name: podman-syft-config - image: docker.io/openmined/grid-frontend:0.8.2-beta.27 + image: docker.io/openmined/grid-frontend:0.8.2-beta.28 imagePullPolicy: IfNotPresent resources: {} tty: true diff --git a/packages/hagrid/hagrid/deps.py b/packages/hagrid/hagrid/deps.py index 39113c2b6e5..e6f00b91184 100644 --- a/packages/hagrid/hagrid/deps.py +++ b/packages/hagrid/hagrid/deps.py @@ -42,7 +42,7 @@ from .version import __version__ LATEST_STABLE_SYFT = "0.8.1" -LATEST_BETA_SYFT = "0.8.2-beta.27" +LATEST_BETA_SYFT = "0.8.2-beta.28" DOCKER_ERROR = """ You are running an old version of docker, possibly on Linux. You need to install v2. diff --git a/packages/hagrid/hagrid/manifest_template.yml b/packages/hagrid/hagrid/manifest_template.yml index fc14dd4ce38..fa6cc2b4469 100644 --- a/packages/hagrid/hagrid/manifest_template.yml +++ b/packages/hagrid/hagrid/manifest_template.yml @@ -1,9 +1,9 @@ manifestVersion: 0.1 hagrid_version: 0.3.71 -syft_version: 0.8.2-beta.27 -dockerTag: 0.8.2-beta.27 +syft_version: 0.8.2-beta.28 +dockerTag: 0.8.2-beta.28 baseUrl: https://raw.githubusercontent.com/OpenMined/PySyft/ -hash: 663166c61b33dfe443add9367ca84dc4c3c84ce6 +hash: ef6e9adb58b7a2d68ef5f41b61ae0d237f36e5be target_dir: ~/.hagrid/PySyft/ files: grid: diff --git a/packages/syft/setup.cfg b/packages/syft/setup.cfg index 87de753c800..de4666afa52 100644 --- a/packages/syft/setup.cfg +++ b/packages/syft/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = syft -version = attr: "0.8.2-beta.27" +version = attr: "0.8.2-beta.28" description = Perform numpy-like analysis on data that remains in someone elses server author = OpenMined author_email = info@openmined.org diff --git a/packages/syft/src/syft/VERSION b/packages/syft/src/syft/VERSION index 6d7567fd24a..7f3f0571209 100644 --- a/packages/syft/src/syft/VERSION +++ b/packages/syft/src/syft/VERSION @@ -1,5 +1,5 @@ # Mono Repo Global Version -__version__ = "0.8.2-beta.27" +__version__ = "0.8.2-beta.28" # elsewhere we can call this file: `python VERSION` and simply take the stdout # stdlib diff --git a/packages/syft/src/syft/__init__.py b/packages/syft/src/syft/__init__.py index 2e9b4aa4aa0..deaedacb5ee 100644 --- a/packages/syft/src/syft/__init__.py +++ b/packages/syft/src/syft/__init__.py @@ -1,4 +1,4 @@ -__version__ = "0.8.2-beta.27" +__version__ = "0.8.2-beta.28" # stdlib import pathlib diff --git a/packages/syftcli/manifest.yml b/packages/syftcli/manifest.yml index 73e90d9c649..58cfdcb9f4f 100644 --- a/packages/syftcli/manifest.yml +++ b/packages/syftcli/manifest.yml @@ -1,11 +1,11 @@ manifestVersion: 1.0 -syftVersion: 0.8.2-beta.27 -dockerTag: 0.8.2-beta.27 +syftVersion: 0.8.2-beta.28 +dockerTag: 0.8.2-beta.28 images: - - docker.io/openmined/grid-frontend:0.8.2-beta.27 - - docker.io/openmined/grid-backend:0.8.2-beta.27 + - docker.io/openmined/grid-frontend:0.8.2-beta.28 + - docker.io/openmined/grid-backend:0.8.2-beta.28 - docker.io/library/mongo:latest - docker.io/traefik:v2.10 From edc9836940f9ecd32395a3f34f0ccbb73f893bcc Mon Sep 17 00:00:00 2001 From: Madhava Jay Date: Mon, 4 Sep 2023 17:28:43 +1000 Subject: [PATCH 22/24] bump dm-haiku==0.0.10 --- packages/syft/setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/syft/setup.cfg b/packages/syft/setup.cfg index 4265bc4e1c6..749f705fa05 100644 --- a/packages/syft/setup.cfg +++ b/packages/syft/setup.cfg @@ -56,7 +56,7 @@ syft = fastapi==0.97.0 hagrid>=0.3 matplotlib==3.7.1 - dm-haiku==0.0.9 + dm-haiku==0.0.10 itables==1.5.3 safetensors==0.3.2 # Pinning as arm linux wheels, not available for safetensors in 0.3.3 transformers==4.30.2 From ade95311c9a2a2f15911e5ea31f81ab6816036bc Mon Sep 17 00:00:00 2001 From: Madhava Jay Date: Mon, 4 Sep 2023 17:33:19 +1000 Subject: [PATCH 23/24] Remove https://whls.blob.core.windows.net/unstable/index.html from tox --- tox.ini | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/tox.ini b/tox.ini index ca9dc00de47..46a5ae90ce4 100644 --- a/tox.ini +++ b/tox.ini @@ -27,11 +27,9 @@ skipsdist = True [testenv] basepython = python3 -install_command = pip install --find-links https://whls.blob.core.windows.net/unstable/index.html {opts} {packages} +install_command = pip install {opts} {packages} commands = python --version -setenv = - PIP_FIND_LINKS=https://whls.blob.core.windows.net/unstable/index.html # Syft [testenv:syft] @@ -39,8 +37,6 @@ deps = -e{toxinidir}/packages/syft[dev] changedir = {toxinidir}/packages/syft description = Syft -setenv = - PIP_FIND_LINKS=https://whls.blob.core.windows.net/unstable/index.html commands = pip list @@ -49,8 +45,6 @@ deps = -e{toxinidir}/packages/hagrid[dev] changedir = {toxinidir}/packages/hagrid description = Syft -setenv = - PIP_FIND_LINKS=https://whls.blob.core.windows.net/unstable/index.html commands = pip list @@ -233,7 +227,6 @@ allowlist_externals = chcp passenv=HOME, USER setenv = - PIP_FIND_LINKS=https://whls.blob.core.windows.net/unstable/index.html HAGRID_FLAGS = {env:HAGRID_FLAGS:--tag=local --test} EMULATION = {env:EMULATION:false} HAGRID_ART = false @@ -339,8 +332,6 @@ commands = [testenv:syft.jupyter] description = Jupyter Notebook with Editable Syft -setenv = - PIP_FIND_LINKS=https://whls.blob.core.windows.net/unstable/index.html deps = {[testenv:syft]deps} {[testenv:hagrid]deps} @@ -606,7 +597,6 @@ allowlist_externals = k3d echo setenv = - PIP_FIND_LINKS=https://whls.blob.core.windows.net/unstable/index.html ORCHESTRA_DEPLOYMENT_TYPE = {env:ORCHESTRA_DEPLOYMENT_TYPE:k8s} NODE_PORT = {env:NODE_PORT:9082} commands = @@ -759,8 +749,6 @@ allowlist_externals = echo rm helm -setenv = - PIP_FIND_LINKS=https://whls.blob.core.windows.net/unstable/index.html commands = k3d version @@ -797,8 +785,6 @@ allowlist_externals = echo rm helm -setenv = - PIP_FIND_LINKS=https://whls.blob.core.windows.net/unstable/index.html commands = bash -c 'cd packages/grid/helm && \ helm lint syft' @@ -832,7 +818,6 @@ allowlist_externals = rm helm setenv = - PIP_FIND_LINKS=https://whls.blob.core.windows.net/unstable/index.html ORCHESTRA_DEPLOYMENT_TYPE = {env:ORCHESTRA_DEPLOYMENT_TYPE:k8s} NODE_PORT = {env:NODE_PORT:8080} commands = From a9d6290995a8273100a9267cfcb5725b7ab66749 Mon Sep 17 00:00:00 2001 From: Shubham Gupta Date: Mon, 4 Sep 2023 14:18:17 +0530 Subject: [PATCH 24/24] fix item_keys_exist query to be OR instead of AND --- packages/syft/src/syft/store/mongo_document_store.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/syft/src/syft/store/mongo_document_store.py b/packages/syft/src/syft/store/mongo_document_store.py index bede24addaf..46664512647 100644 --- a/packages/syft/src/syft/store/mongo_document_store.py +++ b/packages/syft/src/syft/store/mongo_document_store.py @@ -279,9 +279,7 @@ def _set( def item_keys_exist(self, obj, collection): qks: QueryKeys = self.settings.unique_keys.with_obj(obj) - query = {x.key: x.value for x in qks.qks} - if "id" in query: - query["_id"] = query.pop("id") + query = {"$or": [{k: v} for k, v in qks.as_dict_mongo.items()]} res = collection.find_one(query) return res is not None