MEDfl 0.1.16__py3-none-any.whl → 0.1.17__py3-none-any.whl
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.
- Medfl/LearningManager/utils.py +8 -11
- {Medfl-0.1.16.dist-info → Medfl-0.1.17.dist-info}/METADATA +1 -1
- {Medfl-0.1.16.dist-info → Medfl-0.1.17.dist-info}/RECORD +6 -6
- {Medfl-0.1.16.data → Medfl-0.1.17.data}/scripts/setup_mysql.sh +0 -0
- {Medfl-0.1.16.dist-info → Medfl-0.1.17.dist-info}/WHEEL +0 -0
- {Medfl-0.1.16.dist-info → Medfl-0.1.17.dist-info}/top_level.txt +0 -0
Medfl/LearningManager/utils.py
CHANGED
@@ -6,6 +6,9 @@ import yaml
|
|
6
6
|
from sklearn.metrics import *
|
7
7
|
from yaml.loader import SafeLoader
|
8
8
|
|
9
|
+
|
10
|
+
from Medfl.NetManager.database_connector import DatabaseManager
|
11
|
+
|
9
12
|
# from scripts.base import *
|
10
13
|
import json
|
11
14
|
|
@@ -21,8 +24,6 @@ import ast
|
|
21
24
|
|
22
25
|
from sqlalchemy import text
|
23
26
|
|
24
|
-
from Medfl.NetManager.database_connector import DatabaseManager
|
25
|
-
|
26
27
|
|
27
28
|
# Get the directory of the current script
|
28
29
|
current_directory = os.path.dirname(os.path.abspath(__file__))
|
@@ -42,11 +43,11 @@ with open(yaml_path) as g:
|
|
42
43
|
DEFAULT_CONFIG_PATH = 'config.ini'
|
43
44
|
|
44
45
|
|
45
|
-
def
|
46
|
+
def load_db_config():
|
46
47
|
config = os.environ.get('MEDFL_DB_CONFIG')
|
47
48
|
|
48
49
|
if config:
|
49
|
-
return ast.literal_eval(
|
50
|
+
return ast.literal_eval(config)
|
50
51
|
else:
|
51
52
|
raise ValueError(f"MEDfl db config not found")
|
52
53
|
|
@@ -61,13 +62,9 @@ def set_db_config(config_path):
|
|
61
62
|
else:
|
62
63
|
raise ValueError(f"mysql key not found in file '{config_path}'")
|
63
64
|
|
64
|
-
# set the master dataset path
|
65
|
-
|
66
65
|
|
67
|
-
def set_masterDataset_path(dataset_path):
|
68
|
-
os.environ['MEDFL_MASTERDATASET_PATH'] = dataset_path
|
69
66
|
|
70
|
-
# Create
|
67
|
+
# Create databas
|
71
68
|
|
72
69
|
|
73
70
|
def create_MEDfl_db():
|
@@ -176,7 +173,7 @@ def empty_db():
|
|
176
173
|
db_manager = DatabaseManager()
|
177
174
|
db_manager.connect()
|
178
175
|
my_eng = db_manager.get_connection()
|
179
|
-
|
176
|
+
|
180
177
|
# my_eng.execute(text(f"DELETE FROM {'DataSets'}"))
|
181
178
|
my_eng.execute(text(f"DELETE FROM {'Nodes'}"))
|
182
179
|
my_eng.execute(text(f"DELETE FROM {'FedDatasets'}"))
|
@@ -303,7 +300,7 @@ def get_pipeline_result(pipeline_id):
|
|
303
300
|
db_manager = DatabaseManager()
|
304
301
|
db_manager.connect()
|
305
302
|
my_eng = db_manager.get_connection()
|
306
|
-
|
303
|
+
|
307
304
|
data = pd.read_sql(
|
308
305
|
text(
|
309
306
|
f"SELECT * FROM testResults WHERE pipelineid = '{pipeline_id}'"), my_eng
|
@@ -10,7 +10,7 @@ Medfl/LearningManager/params_optimiser.py,sha256=Pg_I5n_sPz-7ZqOsJGmnVM9ye7c5aPp
|
|
10
10
|
Medfl/LearningManager/plot.py,sha256=iPqMV9rVd7hquoFixDL20OzXI5bMpBW41bkVmTKIWtE,7927
|
11
11
|
Medfl/LearningManager/server.py,sha256=iQYiWFWMh9FdyQfNoAGYZ7l67fY4lB0dwICgnDXPOlA,7205
|
12
12
|
Medfl/LearningManager/strategy.py,sha256=n0asQajkHfGLDX3QbbV5qntQA-xuJZU8Z92XccZENsA,3517
|
13
|
-
Medfl/LearningManager/utils.py,sha256
|
13
|
+
Medfl/LearningManager/utils.py,sha256=80yWwpjVsQbYdjpzu5q_mpi6YWpEQUdPhSUdXGK9gx0,9339
|
14
14
|
Medfl/NetManager/__init__.py,sha256=htCEy8g7lrKKeZJ-cH9-YCTyWfIOLwKtoj_dlNasOuM,246
|
15
15
|
Medfl/NetManager/database_connector.py,sha256=UZYeAKOA0BqwDd-KBlNFyTKFT-Du2QtWq1l6e6uIcVA,1574
|
16
16
|
Medfl/NetManager/dataset.py,sha256=NpbmfSKJdtqIsShvjsb_z8W1vqlpYoFyZp8Wzsx_aEc,2869
|
@@ -19,14 +19,14 @@ Medfl/NetManager/net_helper.py,sha256=VYJPVI65wo34X9GO9t1joNGPr3TutZdxfva-X6P3MS
|
|
19
19
|
Medfl/NetManager/net_manager_queries.py,sha256=2dfhba0iuh40kVoC7am-vC4Hlrvr-zfJ5ESymsI1Kps,4327
|
20
20
|
Medfl/NetManager/network.py,sha256=dzSyEv0IFcoAFeXnI4Favhe9aHuw18YZHB9zwm0VwZE,5521
|
21
21
|
Medfl/NetManager/node.py,sha256=c1vxcpzZFRV0KeG7KLBtP_sA_VmTdjG93PWUpGNIsKM,6535
|
22
|
-
Medfl-0.1.
|
22
|
+
Medfl-0.1.17.data/scripts/setup_mysql.sh,sha256=PXl271yvYBrXwrZ7P0tsYHnGkOubKvRaFee4MnzsSko,560
|
23
23
|
alembic/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
24
24
|
alembic/env.py,sha256=a4zJAzPNLHnIrUlXCqf_8vuAlFu0pceFJJKM1PQaOI4,1649
|
25
25
|
scripts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
26
26
|
scripts/base.py,sha256=B0KKbl9Czh4HhExmO41tdbI2-g1OyiW2ArYhLYgKNEw,778
|
27
27
|
scripts/config.ini,sha256=tDQQlpwZbCFQuSS017yjEiLglLihp6wETbWtNrSWeAA,82
|
28
28
|
scripts/create_db.py,sha256=ZoQeXIPRBxpcMX6wgQSUKCHzxg3kixzBz0ysTGpAejs,4461
|
29
|
-
Medfl-0.1.
|
30
|
-
Medfl-0.1.
|
31
|
-
Medfl-0.1.
|
32
|
-
Medfl-0.1.
|
29
|
+
Medfl-0.1.17.dist-info/METADATA,sha256=Usaj59kuK7QoXFhd1b-AScUlFWB_i2c0ERjEGHFAixc,5577
|
30
|
+
Medfl-0.1.17.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
31
|
+
Medfl-0.1.17.dist-info/top_level.txt,sha256=CmLt1TC7PJj-V55rhffMZ9LSOiuSaaEbz9FJm_zOw_E,22
|
32
|
+
Medfl-0.1.17.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|