Skip to content

Commit

Permalink
Merge pull request #9061 from OpenMined/aziz/dataset_data
Browse files Browse the repository at this point in the history
revert asset.data change
  • Loading branch information
shubham3121 authored Jul 18, 2024
2 parents 4a32da7 + 6566332 commit 1b04d4e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
"cell_type": "code",
"execution_count": null,
"id": "0",
"metadata": {},
"metadata": {
"metadata": {}
},
"outputs": [],
"source": [
"# third party\n",
Expand All @@ -27,7 +29,9 @@
"cell_type": "code",
"execution_count": null,
"id": "2",
"metadata": {},
"metadata": {
"metadata": {}
},
"outputs": [],
"source": [
"server = sy.orchestra.launch(name=\"mnist-torch-datasite\", dev_mode=True)\n",
Expand All @@ -46,7 +50,9 @@
"cell_type": "code",
"execution_count": null,
"id": "4",
"metadata": {},
"metadata": {
"metadata": {}
},
"outputs": [],
"source": [
"datasets = ds_client.datasets.get_all()\n",
Expand Down Expand Up @@ -103,7 +109,7 @@
"metadata": {},
"outputs": [],
"source": [
"assert isinstance(training_images.data, sy.SyftError)\n",
"assert training_images.data is None\n",
"training_labels.data"
]
},
Expand Down
2 changes: 0 additions & 2 deletions packages/syft/src/syft/service/dataset/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,6 @@ def data(self) -> Any:
if api is None or api.services is None:
return None
res = api.services.action.get(self.action_id)
if isinstance(res, str):
return SyftError(message=f"Could not access private data. {str(res)}")
if self.has_permission(res):
return res.syft_action_data
else:
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/network/gateway_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def test_dataset_search(set_env_var, gateway_port: int, datasite_1_port: int) ->
assert isinstance(dataset, Dataset)
assert len(dataset.assets) == 1
assert isinstance(dataset.assets[0].mock, np.ndarray)
assert isinstance(dataset.assets[0].data, SyftError)
assert dataset.assets[0].data is None

# search a wrong dataset should return an empty list
wrong_search = sy.search(_random_hash())
Expand Down

0 comments on commit 1b04d4e

Please sign in to comment.