pryvx 2.4.4__tar.gz → 2.4.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pryvx-2.4.4 → pryvx-2.4.5}/PKG-INFO +1 -1
- {pryvx-2.4.4 → pryvx-2.4.5}/pryvx/fl_server.py +2 -2
- {pryvx-2.4.4 → pryvx-2.4.5}/pryvx/pryvx_pb2.py +18 -6
- {pryvx-2.4.4 → pryvx-2.4.5}/pryvx/pryvx_pb2_grpc.py +40 -8
- {pryvx-2.4.4 → pryvx-2.4.5}/pryvx.egg-info/PKG-INFO +1 -1
- {pryvx-2.4.4 → pryvx-2.4.5}/setup.py +1 -1
- {pryvx-2.4.4 → pryvx-2.4.5}/LICENSE +0 -0
- {pryvx-2.4.4 → pryvx-2.4.5}/README.md +0 -0
- {pryvx-2.4.4 → pryvx-2.4.5}/pryvx/__init__.py +0 -0
- {pryvx-2.4.4 → pryvx-2.4.5}/pryvx/fl_client.py +0 -0
- {pryvx-2.4.4 → pryvx-2.4.5}/pryvx/fl_ensemble.py +0 -0
- {pryvx-2.4.4 → pryvx-2.4.5}/pryvx/gdp.py +0 -0
- {pryvx-2.4.4 → pryvx-2.4.5}/pryvx/ldp.py +0 -0
- {pryvx-2.4.4 → pryvx-2.4.5}/pryvx/phe.py +0 -0
- {pryvx-2.4.4 → pryvx-2.4.5}/pryvx/psi.py +0 -0
- {pryvx-2.4.4 → pryvx-2.4.5}/pryvx/smpc.py +0 -0
- {pryvx-2.4.4 → pryvx-2.4.5}/pryvx.egg-info/SOURCES.txt +0 -0
- {pryvx-2.4.4 → pryvx-2.4.5}/pryvx.egg-info/dependency_links.txt +0 -0
- {pryvx-2.4.4 → pryvx-2.4.5}/pryvx.egg-info/requires.txt +0 -0
- {pryvx-2.4.4 → pryvx-2.4.5}/pryvx.egg-info/top_level.txt +0 -0
- {pryvx-2.4.4 → pryvx-2.4.5}/setup.cfg +0 -0
@@ -34,10 +34,10 @@ class ModelServicer(pryvx_pb2_grpc.ModelServiceServicer):
|
|
34
34
|
|
35
35
|
print(f"✅ Received and saved model from {client_id}")
|
36
36
|
|
37
|
-
return f"Model from {client_id} received and saved."
|
37
|
+
return pryvx_pb2.ModelResponse(message=f"Model from {client_id} received and saved.")
|
38
38
|
except Exception as e:
|
39
39
|
print(f"❌ Error processing model: {e}")
|
40
|
-
return "Failed to process model"
|
40
|
+
return pryvx_pb2.ModelResponse(message="Failed to process model")
|
41
41
|
|
42
42
|
|
43
43
|
def start_server():
|
@@ -1,11 +1,22 @@
|
|
1
1
|
# -*- coding: utf-8 -*-
|
2
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
3
|
+
# NO CHECKED-IN PROTOBUF GENCODE
|
3
4
|
# source: pryvx.proto
|
5
|
+
# Protobuf Python Version: 5.29.0
|
4
6
|
"""Generated protocol buffer code."""
|
5
7
|
from google.protobuf import descriptor as _descriptor
|
6
8
|
from google.protobuf import descriptor_pool as _descriptor_pool
|
9
|
+
from google.protobuf import runtime_version as _runtime_version
|
7
10
|
from google.protobuf import symbol_database as _symbol_database
|
8
11
|
from google.protobuf.internal import builder as _builder
|
12
|
+
_runtime_version.ValidateProtobufRuntimeVersion(
|
13
|
+
_runtime_version.Domain.PUBLIC,
|
14
|
+
5,
|
15
|
+
29,
|
16
|
+
0,
|
17
|
+
'',
|
18
|
+
'pryvx.proto'
|
19
|
+
)
|
9
20
|
# @@protoc_insertion_point(imports)
|
10
21
|
|
11
22
|
_sym_db = _symbol_database.Default()
|
@@ -13,16 +24,17 @@ _sym_db = _symbol_database.Default()
|
|
13
24
|
|
14
25
|
|
15
26
|
|
16
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0bpryvx.proto\x12\x05pryvx\"\x1d\n\x0bModelParams\x12\x0e\n\x06params\x18\x01 \x01(\x0c\
|
27
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0bpryvx.proto\x12\x05pryvx\"\x1d\n\x0bModelParams\x12\x0e\n\x06params\x18\x01 \x01(\x0c\" \n\rModelResponse\x12\x0f\n\x07message\x18\x01 \x01(\t2M\n\x0cModelService\x12=\n\x0fSendModelParams\x12\x12.pryvx.ModelParams\x1a\x14.pryvx.ModelResponse\"\x00\x62\x06proto3')
|
17
28
|
|
18
29
|
_globals = globals()
|
19
30
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
20
31
|
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'pryvx_pb2', _globals)
|
21
|
-
if _descriptor._USE_C_DESCRIPTORS
|
22
|
-
|
23
|
-
DESCRIPTOR._options = None
|
32
|
+
if not _descriptor._USE_C_DESCRIPTORS:
|
33
|
+
DESCRIPTOR._loaded_options = None
|
24
34
|
_globals['_MODELPARAMS']._serialized_start=22
|
25
35
|
_globals['_MODELPARAMS']._serialized_end=51
|
26
|
-
_globals['
|
27
|
-
_globals['
|
36
|
+
_globals['_MODELRESPONSE']._serialized_start=53
|
37
|
+
_globals['_MODELRESPONSE']._serialized_end=85
|
38
|
+
_globals['_MODELSERVICE']._serialized_start=87
|
39
|
+
_globals['_MODELSERVICE']._serialized_end=164
|
28
40
|
# @@protoc_insertion_point(module_scope)
|
@@ -1,7 +1,28 @@
|
|
1
1
|
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
2
2
|
"""Client and server classes corresponding to protobuf-defined services."""
|
3
3
|
import grpc
|
4
|
-
|
4
|
+
import warnings
|
5
|
+
|
6
|
+
import pryvx_pb2 as pryvx__pb2
|
7
|
+
|
8
|
+
GRPC_GENERATED_VERSION = '1.70.0'
|
9
|
+
GRPC_VERSION = grpc.__version__
|
10
|
+
_version_not_supported = False
|
11
|
+
|
12
|
+
try:
|
13
|
+
from grpc._utilities import first_version_is_lower
|
14
|
+
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
|
15
|
+
except ImportError:
|
16
|
+
_version_not_supported = True
|
17
|
+
|
18
|
+
if _version_not_supported:
|
19
|
+
raise RuntimeError(
|
20
|
+
f'The grpc package installed is at version {GRPC_VERSION},'
|
21
|
+
+ f' but the generated code in pryvx_pb2_grpc.py depends on'
|
22
|
+
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
|
23
|
+
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
|
24
|
+
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
|
25
|
+
)
|
5
26
|
|
6
27
|
|
7
28
|
class ModelServiceStub(object):
|
@@ -16,8 +37,8 @@ class ModelServiceStub(object):
|
|
16
37
|
self.SendModelParams = channel.unary_unary(
|
17
38
|
'/pryvx.ModelService/SendModelParams',
|
18
39
|
request_serializer=pryvx__pb2.ModelParams.SerializeToString,
|
19
|
-
response_deserializer=pryvx__pb2.
|
20
|
-
)
|
40
|
+
response_deserializer=pryvx__pb2.ModelResponse.FromString,
|
41
|
+
_registered_method=True)
|
21
42
|
|
22
43
|
|
23
44
|
class ModelServiceServicer(object):
|
@@ -35,12 +56,13 @@ def add_ModelServiceServicer_to_server(servicer, server):
|
|
35
56
|
'SendModelParams': grpc.unary_unary_rpc_method_handler(
|
36
57
|
servicer.SendModelParams,
|
37
58
|
request_deserializer=pryvx__pb2.ModelParams.FromString,
|
38
|
-
response_serializer=pryvx__pb2.
|
59
|
+
response_serializer=pryvx__pb2.ModelResponse.SerializeToString,
|
39
60
|
),
|
40
61
|
}
|
41
62
|
generic_handler = grpc.method_handlers_generic_handler(
|
42
63
|
'pryvx.ModelService', rpc_method_handlers)
|
43
64
|
server.add_generic_rpc_handlers((generic_handler,))
|
65
|
+
server.add_registered_method_handlers('pryvx.ModelService', rpc_method_handlers)
|
44
66
|
|
45
67
|
|
46
68
|
# This class is part of an EXPERIMENTAL API.
|
@@ -58,8 +80,18 @@ class ModelService(object):
|
|
58
80
|
wait_for_ready=None,
|
59
81
|
timeout=None,
|
60
82
|
metadata=None):
|
61
|
-
return grpc.experimental.unary_unary(
|
83
|
+
return grpc.experimental.unary_unary(
|
84
|
+
request,
|
85
|
+
target,
|
86
|
+
'/pryvx.ModelService/SendModelParams',
|
62
87
|
pryvx__pb2.ModelParams.SerializeToString,
|
63
|
-
pryvx__pb2.
|
64
|
-
options,
|
65
|
-
|
88
|
+
pryvx__pb2.ModelResponse.FromString,
|
89
|
+
options,
|
90
|
+
channel_credentials,
|
91
|
+
insecure,
|
92
|
+
call_credentials,
|
93
|
+
compression,
|
94
|
+
wait_for_ready,
|
95
|
+
timeout,
|
96
|
+
metadata,
|
97
|
+
_registered_method=True)
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|