fedops 0.2.1__tar.gz → 0.2.2__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.
- {fedops-0.2.1 → fedops-0.2.2}/PKG-INFO +1 -1
- {fedops-0.2.1 → fedops-0.2.2}/fedops/client/app.py +8 -4
- {fedops-0.2.1 → fedops-0.2.2}/fedops/client/client_wandb.py +2 -6
- {fedops-0.2.1 → fedops-0.2.2}/fedops.egg-info/PKG-INFO +1 -1
- {fedops-0.2.1 → fedops-0.2.2}/setup.py +1 -1
- {fedops-0.2.1 → fedops-0.2.2}/fedops/__init__.py +0 -0
- {fedops-0.2.1 → fedops-0.2.2}/fedops/client/__init__.py +0 -0
- {fedops-0.2.1 → fedops-0.2.2}/fedops/client/app_test.py +0 -0
- {fedops-0.2.1 → fedops-0.2.2}/fedops/client/client_api.py +0 -0
- {fedops-0.2.1 → fedops-0.2.2}/fedops/client/client_fl.py +0 -0
- {fedops-0.2.1 → fedops-0.2.2}/fedops/client/client_utils.py +0 -0
- {fedops-0.2.1 → fedops-0.2.2}/fedops/client/test.py +0 -0
- {fedops-0.2.1 → fedops-0.2.2}/fedops/server/__init__.py +0 -0
- {fedops-0.2.1 → fedops-0.2.2}/fedops/server/app.py +0 -0
- {fedops-0.2.1 → fedops-0.2.2}/fedops/server/server_api.py +0 -0
- {fedops-0.2.1 → fedops-0.2.2}/fedops/server/server_utils.py +0 -0
- {fedops-0.2.1 → fedops-0.2.2}/fedops/utils/__init__.py +0 -0
- {fedops-0.2.1 → fedops-0.2.2}/fedops/utils/version.py +0 -0
- {fedops-0.2.1 → fedops-0.2.2}/fedops.egg-info/SOURCES.txt +0 -0
- {fedops-0.2.1 → fedops-0.2.2}/fedops.egg-info/dependency_links.txt +0 -0
- {fedops-0.2.1 → fedops-0.2.2}/fedops.egg-info/requires.txt +0 -0
- {fedops-0.2.1 → fedops-0.2.2}/fedops.egg-info/top_level.txt +0 -0
- {fedops-0.2.1 → fedops-0.2.2}/setup.cfg +0 -0
|
@@ -10,10 +10,11 @@ from . import client_fl
|
|
|
10
10
|
from . import client_wandb
|
|
11
11
|
from . import client_api
|
|
12
12
|
|
|
13
|
+
|
|
13
14
|
class FLClientTask():
|
|
14
15
|
def __init__(self, config, fl_task):
|
|
15
16
|
self.app = FastAPI()
|
|
16
|
-
|
|
17
|
+
|
|
17
18
|
self.x_train = fl_task[0]
|
|
18
19
|
self.x_test = fl_task[1]
|
|
19
20
|
self.y_train = fl_task[2]
|
|
@@ -27,7 +28,7 @@ class FLClientTask():
|
|
|
27
28
|
self.validation_split = config['data']['validation_split']
|
|
28
29
|
self.wandb_key = config['wandb']['api_key']
|
|
29
30
|
self.wandb_account = config['wandb']['account']
|
|
30
|
-
|
|
31
|
+
|
|
31
32
|
self.status = client_utils.FLClientStatus()
|
|
32
33
|
|
|
33
34
|
async def fl_client_start(self):
|
|
@@ -85,6 +86,9 @@ class FLClientTask():
|
|
|
85
86
|
wandb_run.log({"operation_time": fl_end_time, "next_gl_model_v": self.status.FL_next_gl_model},
|
|
86
87
|
step=self.status.FL_next_gl_model)
|
|
87
88
|
|
|
89
|
+
# close wandb
|
|
90
|
+
wandb_run.finish()
|
|
91
|
+
|
|
88
92
|
client_all_time_result = {"fl_task_id": self.task_id, "client_mac": self.status.FL_client_mac,
|
|
89
93
|
"operation_time": fl_end_time,
|
|
90
94
|
"next_gl_model_v": self.status.FL_next_gl_model, "wandb_name": wandb_name}
|
|
@@ -154,7 +158,7 @@ class FLClientTask():
|
|
|
154
158
|
background_tasks.add_task(self.fl_client_start)
|
|
155
159
|
|
|
156
160
|
return self.status
|
|
157
|
-
|
|
161
|
+
|
|
158
162
|
try:
|
|
159
163
|
# create client api => to connect client manager
|
|
160
164
|
uvicorn.run(self.app, host='0.0.0.0', port=8002)
|
|
@@ -167,5 +171,5 @@ class FLClientTask():
|
|
|
167
171
|
# FL client out
|
|
168
172
|
client_api.ClientMangerAPI().get_client_out()
|
|
169
173
|
logging.info(f'{self.status.FL_client_mac}-client close')
|
|
170
|
-
|
|
174
|
+
|
|
171
175
|
|
|
@@ -35,8 +35,7 @@ def client_system_wandb(fl_task_id, client_mac, next_gl_model_v, wandb_name, wan
|
|
|
35
35
|
|
|
36
36
|
sys_df = runs[0].history(stream="system")
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
cols = [c.replace('\n', '') for c in col]
|
|
38
|
+
cols = ['system.network.sent', 'system.network.recv', 'system.disk', '_runtime', 'system.proc.memory.rssMB','system.proc.memory.availableMB', 'system.cpu', 'system.proc.cpu.threads', 'system.memory', 'system.proc.memory.percent', '_timestamp']
|
|
40
39
|
|
|
41
40
|
sys_df = sys_df[cols]
|
|
42
41
|
|
|
@@ -67,9 +66,6 @@ def client_system_wandb(fl_task_id, client_mac, next_gl_model_v, wandb_name, wan
|
|
|
67
66
|
# send client_system to client_performance pod
|
|
68
67
|
client_api.ClientServerAPI(fl_task_id).put_client_system(sys_df_row_json)
|
|
69
68
|
|
|
70
|
-
# close wandb
|
|
71
|
-
wandb.finish()
|
|
72
|
-
|
|
73
69
|
except Exception as e:
|
|
74
70
|
logging.error(f'wandb system load error: {e}')
|
|
75
|
-
|
|
71
|
+
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|