Skip to content

Commit

Permalink
Merge branch 'dev' into fix-notemetadajson
Browse files Browse the repository at this point in the history
  • Loading branch information
shubham3121 authored Nov 1, 2023
2 parents e228e27 + 2c5b88e commit 92ca647
Show file tree
Hide file tree
Showing 38 changed files with 332 additions and 139 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.8.2-beta.43
current_version = 0.8.2-beta.44
tag = False
tag_name = {new_version}
commit = True
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Mono Repo Global Version
__version__ = "0.8.2-beta.43"
__version__ = "0.8.2-beta.44"
# elsewhere we can call this file: `python VERSION` and simply take the stdout

# stdlib
Expand Down
2 changes: 1 addition & 1 deletion notebooks/api/0.8/07-domain-register-control-flow.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@
"metadata": {},
"outputs": [],
"source": [
"assert root_client.metadata.signup_enabled == False\n",
"assert root_client.settings.get().signup_enabled == False\n",
"assert isinstance(response_1, sy.SyftSuccess)\n",
"assert isinstance(response_2, sy.SyftError)\n",
"assert isinstance(response_3, sy.SyftError)"
Expand Down
26 changes: 23 additions & 3 deletions notebooks/tutorials/data-engineer/02-deployment-types.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,16 @@
")"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "86e66c8b-afa4-4236-a362-7ec9e07a7063",
"metadata": {},
"outputs": [],
"source": [
"assert memory_node is not None"
]
},
{
"cell_type": "markdown",
"id": "4573b485",
Expand All @@ -89,13 +99,23 @@
"outputs": [],
"source": [
"webserver_node = sy.Orchestra.launch(\n",
" name=\"Arbitrary Dev Node\",\n",
" name=\"Arbitrary Webserver Dev Node\",\n",
" dev_mode=True,\n",
" reset=True,\n",
" port=80\n",
" port=8081\n",
")"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "86ce3464-a51c-4870-a293-e479c08c66bc",
"metadata": {},
"outputs": [],
"source": [
"assert webserver_node is not None"
]
},
{
"cell_type": "markdown",
"id": "dd74621a",
Expand Down Expand Up @@ -353,7 +373,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.9"
"version": "3.10.12"
}
},
"nbformat": 4,
Expand Down
2 changes: 1 addition & 1 deletion packages/grid/VERSION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Mono Repo Global Version
__version__ = "0.8.2-beta.43"
__version__ = "0.8.2-beta.44"
# elsewhere we can call this file: `python VERSION` and simply take the stdout

# stdlib
Expand Down
4 changes: 2 additions & 2 deletions packages/grid/devspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.43 -t dev-latest
build_images --all -t $(git rev-parse --short=6 HEAD) -t 0.8.2-beta.44 -t dev-latest
create_deployments --all
vars:
DEVSPACE_ENV_FILE: "default.env"
CONTAINER_REGISTRY: "docker.io"
VERSION: "0.8.2-beta.43"
VERSION: "0.8.2-beta.44"

# 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
Expand Down
2 changes: 1 addition & 1 deletion packages/grid/frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pygrid-ui",
"version": "0.8.2-beta.43",
"version": "0.8.2-beta.44",
"private": true,
"scripts": {
"dev": "pnpm i && vite dev --host --port 80",
Expand Down
34 changes: 25 additions & 9 deletions packages/grid/helm/repo/index.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,25 @@
apiVersion: v1
entries:
syft:
- apiVersion: v2
appVersion: 0.8.2-beta.44
created: "2023-11-01T11:14:39.125729952Z"
dependencies:
- name: component-chart
repository: https://charts.devspace.sh
version: 0.9.1
description: Perform numpy-like analysis on data that remains in someone elses
server
digest: 4267aff4bfdde651072af23c4da565320a24ddc452ee62b815bcf2af0563fced
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.44.tgz
version: 0.8.2-beta.44
- apiVersion: v2
appVersion: 0.8.2-beta.43
created: "2023-11-01T09:01:30.063405211Z"
created: "2023-11-01T11:14:39.124691694Z"
dependencies:
- name: component-chart
repository: https://charts.devspace.sh
Expand All @@ -19,7 +35,7 @@ entries:
version: 0.8.2-beta.43
- apiVersion: v2
appVersion: 0.8.2-beta.42
created: "2023-11-01T09:01:30.062429802Z"
created: "2023-11-01T11:14:39.123154708Z"
dependencies:
- name: component-chart
repository: https://charts.devspace.sh
Expand All @@ -35,7 +51,7 @@ entries:
version: 0.8.2-beta.42
- apiVersion: v2
appVersion: 0.8.2-beta.41
created: "2023-11-01T09:01:30.061160189Z"
created: "2023-11-01T11:14:39.121809633Z"
dependencies:
- name: component-chart
repository: https://charts.devspace.sh
Expand All @@ -51,7 +67,7 @@ entries:
version: 0.8.2-beta.41
- apiVersion: v2
appVersion: 0.8.2-beta.40
created: "2023-11-01T09:01:30.059896877Z"
created: "2023-11-01T11:14:39.120394255Z"
dependencies:
- name: component-chart
repository: https://charts.devspace.sh
Expand All @@ -67,7 +83,7 @@ entries:
version: 0.8.2-beta.40
- apiVersion: v2
appVersion: 0.8.2-beta.39
created: "2023-11-01T09:01:30.058862267Z"
created: "2023-11-01T11:14:39.118828467Z"
dependencies:
- name: component-chart
repository: https://charts.devspace.sh
Expand All @@ -83,7 +99,7 @@ entries:
version: 0.8.2-beta.39
- apiVersion: v2
appVersion: 0.8.2-beta.38
created: "2023-11-01T09:01:30.057726556Z"
created: "2023-11-01T11:14:39.115163663Z"
dependencies:
- name: component-chart
repository: https://charts.devspace.sh
Expand All @@ -99,7 +115,7 @@ entries:
version: 0.8.2-beta.38
- apiVersion: v2
appVersion: 0.8.2-beta.37
created: "2023-11-01T09:01:30.056581445Z"
created: "2023-11-01T11:14:39.113354662Z"
dependencies:
- name: component-chart
repository: https://charts.devspace.sh
Expand All @@ -115,7 +131,7 @@ entries:
version: 0.8.2-beta.37
- apiVersion: v2
appVersion: 0.8.1
created: "2023-11-01T09:01:30.055357833Z"
created: "2023-11-01T11:14:39.112078691Z"
dependencies:
- name: component-chart
repository: https://charts.devspace.sh
Expand All @@ -129,4 +145,4 @@ entries:
urls:
- https://openmined.github.io/PySyft/helm/syft-0.8.1.tgz
version: 0.8.1
generated: "2023-11-01T09:01:30.053688917Z"
generated: "2023-11-01T11:14:39.110061679Z"
Binary file added packages/grid/helm/repo/syft-0.8.2-beta.44.tgz
Binary file not shown.
4 changes: 2 additions & 2 deletions packages/grid/helm/syft/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.43"
appVersion: "0.8.2-beta.43"
version: "0.8.2-beta.44"
appVersion: "0.8.2-beta.44"
icon: https://raw.githubusercontent.com/OpenMined/PySyft/dev/docs/img/title_syft_light.png

dependencies:
Expand Down
4 changes: 2 additions & 2 deletions packages/grid/podman/podman-kube/podman-syft-kube.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ spec:
- configMapRef:
name: podman-syft-config

image: docker.io/openmined/grid-backend:0.8.2-beta.43
image: docker.io/openmined/grid-backend:0.8.2-beta.44
imagePullPolicy: IfNotPresent
resources: {}
tty: true
Expand All @@ -57,7 +57,7 @@ spec:
envFrom:
- configMapRef:
name: podman-syft-config
image: docker.io/openmined/grid-frontend:0.8.2-beta.43
image: docker.io/openmined/grid-frontend:0.8.2-beta.44
imagePullPolicy: IfNotPresent
resources: {}
tty: true
Expand Down
2 changes: 1 addition & 1 deletion packages/hagrid/hagrid/deps.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
from .version import __version__

LATEST_STABLE_SYFT = "0.8.1"
LATEST_BETA_SYFT = "0.8.2-beta.43"
LATEST_BETA_SYFT = "0.8.2-beta.44"

DOCKER_ERROR = """
You are running an old version of docker, possibly on Linux. You need to install v2.
Expand Down
6 changes: 3 additions & 3 deletions packages/hagrid/hagrid/manifest_template.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
manifestVersion: 0.1
hagrid_version: 0.3.79
syft_version: 0.8.2-beta.43
dockerTag: 0.8.2-beta.43
syft_version: 0.8.2-beta.44
dockerTag: 0.8.2-beta.44
baseUrl: https://raw.githubusercontent.com/OpenMined/PySyft/
hash: 597988d661d6e607396e33b5bde007a4e00a0707
hash: d3bb2705bb609c2f1b106353369d2083f6a38d79
target_dir: ~/.hagrid/PySyft/
files:
grid:
Expand Down
2 changes: 1 addition & 1 deletion packages/syft/setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = syft
version = attr: "0.8.2-beta.43"
version = attr: "0.8.2-beta.44"
description = Perform numpy-like analysis on data that remains in someone elses server
author = OpenMined
author_email = [email protected]
Expand Down
2 changes: 1 addition & 1 deletion packages/syft/src/syft/VERSION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Mono Repo Global Version
__version__ = "0.8.2-beta.43"
__version__ = "0.8.2-beta.44"
# elsewhere we can call this file: `python VERSION` and simply take the stdout

# stdlib
Expand Down
2 changes: 1 addition & 1 deletion packages/syft/src/syft/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "0.8.2-beta.43"
__version__ = "0.8.2-beta.44"

# stdlib
import pathlib
Expand Down
4 changes: 2 additions & 2 deletions packages/syft/src/syft/client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
from ..serde.serialize import _serialize
from ..service.context import NodeServiceContext
from ..service.metadata.node_metadata import NodeMetadataJSON
from ..service.metadata.node_metadata import NodeMetadataV2
from ..service.metadata.node_metadata import NodeMetadataV3
from ..service.response import SyftError
from ..service.response import SyftSuccess
from ..service.user.user import UserCreate
Expand Down Expand Up @@ -597,7 +597,7 @@ def exchange_route(self, client: Self) -> Union[SyftSuccess, SyftError]:
result = self.api.services.network.exchange_credentials_with(
self_node_route=self_node_route,
remote_node_route=remote_node_route,
remote_node_verify_key=client.metadata.to(NodeMetadataV2).verify_key,
remote_node_verify_key=client.metadata.to(NodeMetadataV3).verify_key,
)

return result
Expand Down
49 changes: 22 additions & 27 deletions packages/syft/src/syft/node/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
from ..service.dataset.dataset_service import DatasetService
from ..service.enclave.enclave_service import EnclaveService
from ..service.metadata.metadata_service import MetadataService
from ..service.metadata.node_metadata import NodeMetadataV2
from ..service.metadata.node_metadata import NodeMetadataV3
from ..service.network.network_service import NetworkService
from ..service.notification.notification_service import NotificationService
from ..service.object_search.migration_state_service import MigrateStateService
Expand All @@ -82,7 +82,7 @@
from ..service.service import AbstractService
from ..service.service import ServiceConfigRegistry
from ..service.service import UserServiceConfigRegistry
from ..service.settings.settings import NodeSettings
from ..service.settings.settings import NodeSettingsV2
from ..service.settings.settings_service import SettingsService
from ..service.settings.settings_stash import SettingsStash
from ..service.user.user import User
Expand Down Expand Up @@ -741,43 +741,35 @@ def _get_service_method_from_path(self, path: str) -> Callable:
return getattr(service_obj, method_name)

@property
def metadata(self) -> NodeMetadataV2:
def settings(self) -> NodeSettingsV2:
settings_stash = SettingsStash(store=self.document_store)
settings = settings_stash.get_all(self.signing_key.verify_key)
if settings.is_ok() and len(settings.ok()) > 0:
settings_data = settings.ok()[0]
return settings_data

@property
def metadata(self) -> NodeMetadataV3:
name = ""
deployed_on = ""
organization = ""
on_board = False
description = ""
signup_enabled = False
admin_email = ""
show_warnings = self.enable_warnings
settings_data = self.settings
name = settings_data.name
organization = settings_data.organization
description = settings_data.description
show_warnings = settings_data.show_warnings

settings_stash = SettingsStash(store=self.document_store)
settings = settings_stash.get_all(self.signing_key.verify_key)
if settings.is_ok() and len(settings.ok()) > 0:
settings_data = settings.ok()[0]
name = settings_data.name
deployed_on = settings_data.deployed_on
organization = settings_data.organization
on_board = settings_data.on_board
description = settings_data.description
signup_enabled = settings_data.signup_enabled
admin_email = settings_data.admin_email
show_warnings = settings_data.show_warnings

return NodeMetadataV2(
return NodeMetadataV3(
name=name,
id=self.id,
verify_key=self.verify_key,
highest_version=SYFT_OBJECT_VERSION_1,
lowest_version=SYFT_OBJECT_VERSION_1,
syft_version=__version__,
deployed_on=deployed_on,
description=description,
organization=organization,
on_board=on_board,
node_type=self.node_type.value,
signup_enabled=signup_enabled,
admin_email=admin_email,
node_side_type=self.node_side_type.value,
show_warnings=show_warnings,
)
Expand Down Expand Up @@ -967,7 +959,7 @@ def get_unauthed_context(
) -> NodeServiceContext:
return UnauthedServiceContext(node=self, login_credentials=login_credentials)

def create_initial_settings(self, admin_email: str) -> Optional[NodeSettings]:
def create_initial_settings(self, admin_email: str) -> Optional[NodeSettingsV2]:
if self.name is None:
self.name = random_name()
try:
Expand All @@ -981,8 +973,11 @@ def create_initial_settings(self, admin_email: str) -> Optional[NodeSettings]:
# as enclaves do not have superusers
if self.node_type == NodeType.ENCLAVE:
flags.CAN_REGISTER = True
new_settings = NodeSettings(
new_settings = NodeSettingsV2(
id=self.id,
name=self.name,
verify_key=self.verify_key,
node_type=self.node_type,
deployed_on=datetime.now().date().strftime("%m/%d/%Y"),
signup_enabled=flags.CAN_REGISTER,
admin_email=admin_email,
Expand Down
Loading

0 comments on commit 92ca647

Please sign in to comment.