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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fedops
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: FL Lifecycle Operations Management Platform
5
5
  Home-page: https://github.com/gachon-CCLab/FedOps.git
6
6
  Author: Semo Yang
@@ -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
- col = ['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']
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
- wandb.finish() # close wandb
71
+
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fedops
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: FL Lifecycle Operations Management Platform
5
5
  Home-page: https://github.com/gachon-CCLab/FedOps.git
6
6
  Author: Semo Yang
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name='fedops',
5
- version='0.2.1',
5
+ version='0.2.2',
6
6
  author='Semo Yang',
7
7
  author_email='tpah20@gmail.com',
8
8
  description='FL Lifecycle Operations Management Platform',
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