MEDfl 0.1.34__py3-none-any.whl → 0.1.35__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.
Files changed (33) hide show
  1. {MEDfl-0.1.34.dist-info → MEDfl-0.1.35.dist-info}/METADATA +1 -1
  2. MEDfl-0.1.35.dist-info/RECORD +30 -0
  3. MEDfl-0.1.34.dist-info/RECORD +0 -34
  4. scripts/__init__.py +0 -0
  5. scripts/base.py +0 -30
  6. scripts/config.ini +0 -6
  7. scripts/create_db.py +0 -133
  8. {Medfl → MEDfl}/LearningManager/__init__.py +0 -0
  9. {Medfl → MEDfl}/LearningManager/client.py +0 -0
  10. {Medfl → MEDfl}/LearningManager/dynamicModal.py +0 -0
  11. {Medfl → MEDfl}/LearningManager/federated_dataset.py +0 -0
  12. {Medfl → MEDfl}/LearningManager/flpipeline.py +0 -0
  13. {Medfl → MEDfl}/LearningManager/model.py +0 -0
  14. {Medfl → MEDfl}/LearningManager/params.yaml +0 -0
  15. {Medfl → MEDfl}/LearningManager/params_optimiser.py +0 -0
  16. {Medfl → MEDfl}/LearningManager/plot.py +0 -0
  17. {Medfl → MEDfl}/LearningManager/server.py +0 -0
  18. {Medfl → MEDfl}/LearningManager/strategy.py +0 -0
  19. {Medfl → MEDfl}/LearningManager/utils.py +0 -0
  20. {Medfl → MEDfl}/NetManager/__init__.py +0 -0
  21. {Medfl → MEDfl}/NetManager/database_connector.py +0 -0
  22. {Medfl → MEDfl}/NetManager/dataset.py +0 -0
  23. {Medfl → MEDfl}/NetManager/flsetup.py +0 -0
  24. {Medfl → MEDfl}/NetManager/net_helper.py +0 -0
  25. {Medfl → MEDfl}/NetManager/net_manager_queries.py +0 -0
  26. {Medfl → MEDfl}/NetManager/network.py +0 -0
  27. {Medfl → MEDfl}/NetManager/node.py +0 -0
  28. {Medfl → MEDfl}/__init__.py +0 -0
  29. {Medfl → MEDfl}/scripts/__init__.py +0 -0
  30. {Medfl → MEDfl}/scripts/base.py +0 -0
  31. {Medfl → MEDfl}/scripts/create_db.py +0 -0
  32. {MEDfl-0.1.34.dist-info → MEDfl-0.1.35.dist-info}/WHEEL +0 -0
  33. {MEDfl-0.1.34.dist-info → MEDfl-0.1.35.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: MEDfl
3
- Version: 0.1.34
3
+ Version: 0.1.35
4
4
  Summary: Python Open-source package for simulating federated learning and differential privacy
5
5
  Home-page: https://github.com/MEDomics-UdeS/MEDfl
6
6
  Author: MEDomics consortium
@@ -0,0 +1,30 @@
1
+ MEDfl/__init__.py,sha256=pMyTkws4slDkLQgPpPdKoWdQf1rZGHXAlNxfPFFZM-I,81
2
+ MEDfl/LearningManager/__init__.py,sha256=_lfMR4HOx4wmJnGKCowXnln9oKQEkOZexUzZRBSgfZI,334
3
+ MEDfl/LearningManager/client.py,sha256=9WyLYCsI9JuHjneLbbzDf7HtzjYINuLfqwkbxOsrBrE,6083
4
+ MEDfl/LearningManager/dynamicModal.py,sha256=0mTvDJlss0uSJ3_EXOuL_d-zRmFyXaKB4W4ql-uEX8Y,10821
5
+ MEDfl/LearningManager/federated_dataset.py,sha256=fQqIbhO6LSk16Ob9z6RohaZ8X71Ff-yueynjulrl4M0,2141
6
+ MEDfl/LearningManager/flpipeline.py,sha256=M4-OL4nlogv08J_YsyDsGHXR6xe8BWx4HIsuL1QyUvY,7303
7
+ MEDfl/LearningManager/model.py,sha256=DA7HP34Eq1Ra65OlkBmjH9d2MD7OEbsOhfxD48l4QOk,7679
8
+ MEDfl/LearningManager/params.yaml,sha256=5I-NljhnSaqzjkWVNzrOtrB8z7tnHBKiBmY-mKGhBQM,450
9
+ MEDfl/LearningManager/params_optimiser.py,sha256=pjhDskhSPuca-jnarYoJcFVBvRkdD9tD3992q_eMPSE,18060
10
+ MEDfl/LearningManager/plot.py,sha256=iPqMV9rVd7hquoFixDL20OzXI5bMpBW41bkVmTKIWtE,7927
11
+ MEDfl/LearningManager/server.py,sha256=7edxPkZ9Ju3Mep_BSHQpUNgW9HKfCui3_l996buJVlU,7258
12
+ MEDfl/LearningManager/strategy.py,sha256=n0asQajkHfGLDX3QbbV5qntQA-xuJZU8Z92XccZENsA,3517
13
+ MEDfl/LearningManager/utils.py,sha256=vEhkpyC7iLsn4wp1wDh7GzAn5MCJ7T69jkS9lfmKA1Y,9936
14
+ MEDfl/NetManager/__init__.py,sha256=kR9muJ9fdGMglVmWaraAMiJia_TiTSUcZaNgHS6Cglg,269
15
+ MEDfl/NetManager/database_connector.py,sha256=JKfFLom7I4zuykb8m7aY4cUYZy4j0-i9w3R_jkPzjXY,1516
16
+ MEDfl/NetManager/dataset.py,sha256=eEuVzCp5dGD4tvDVKq6jlSReecge7T20ByG4d7_cnXU,2869
17
+ MEDfl/NetManager/flsetup.py,sha256=CS7531I08eLm6txMIDWFMCIrPP-dNpOLBTaR2BR6X0c,11754
18
+ MEDfl/NetManager/net_helper.py,sha256=T5Y-03SVskK8oXXIpiXzASyEDPQJbcuGVpIS9FnmzI8,7066
19
+ MEDfl/NetManager/net_manager_queries.py,sha256=bJ7V6NZAjLM0sEPrczN7vUeB7sMZZzYZjO-rnUCpQPc,4228
20
+ MEDfl/NetManager/network.py,sha256=D7liCx-1PGx9Z3pctI1_NOGG--gGtvzfr_-BCOdwsOg,7023
21
+ MEDfl/NetManager/node.py,sha256=Azye74P4ZUDQxPrQOId4BK8hX-9RzFtN2Ji8NXbDCEM,6726
22
+ MEDfl/scripts/__init__.py,sha256=wAcxrhYRhcTI3CAmCCd4D2psvimuig-DPXQyij0BZT4,45
23
+ MEDfl/scripts/base.py,sha256=pR7StIt3PpX30aoh53gMkpeNJMHytAPhdc7N09tCITA,781
24
+ MEDfl/scripts/create_db.py,sha256=PgA6N68iTSfnrt6zy7FDZX2lLjQQ7Ual1Y0efve8gf4,3943
25
+ alembic/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
26
+ alembic/env.py,sha256=a4zJAzPNLHnIrUlXCqf_8vuAlFu0pceFJJKM1PQaOI4,1649
27
+ MEDfl-0.1.35.dist-info/METADATA,sha256=vejjqqCuXCQBa7-TBHUQKONVUJpt62uF8ezlz-ubc4I,5582
28
+ MEDfl-0.1.35.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
29
+ MEDfl-0.1.35.dist-info/top_level.txt,sha256=dIL9X8HOFuaVSzpg40DVveDPrymWRoShHtspH7kkjdI,14
30
+ MEDfl-0.1.35.dist-info/RECORD,,
@@ -1,34 +0,0 @@
1
- Medfl/__init__.py,sha256=pMyTkws4slDkLQgPpPdKoWdQf1rZGHXAlNxfPFFZM-I,81
2
- Medfl/LearningManager/__init__.py,sha256=_lfMR4HOx4wmJnGKCowXnln9oKQEkOZexUzZRBSgfZI,334
3
- Medfl/LearningManager/client.py,sha256=9WyLYCsI9JuHjneLbbzDf7HtzjYINuLfqwkbxOsrBrE,6083
4
- Medfl/LearningManager/dynamicModal.py,sha256=0mTvDJlss0uSJ3_EXOuL_d-zRmFyXaKB4W4ql-uEX8Y,10821
5
- Medfl/LearningManager/federated_dataset.py,sha256=fQqIbhO6LSk16Ob9z6RohaZ8X71Ff-yueynjulrl4M0,2141
6
- Medfl/LearningManager/flpipeline.py,sha256=M4-OL4nlogv08J_YsyDsGHXR6xe8BWx4HIsuL1QyUvY,7303
7
- Medfl/LearningManager/model.py,sha256=DA7HP34Eq1Ra65OlkBmjH9d2MD7OEbsOhfxD48l4QOk,7679
8
- Medfl/LearningManager/params.yaml,sha256=5I-NljhnSaqzjkWVNzrOtrB8z7tnHBKiBmY-mKGhBQM,450
9
- Medfl/LearningManager/params_optimiser.py,sha256=pjhDskhSPuca-jnarYoJcFVBvRkdD9tD3992q_eMPSE,18060
10
- Medfl/LearningManager/plot.py,sha256=iPqMV9rVd7hquoFixDL20OzXI5bMpBW41bkVmTKIWtE,7927
11
- Medfl/LearningManager/server.py,sha256=7edxPkZ9Ju3Mep_BSHQpUNgW9HKfCui3_l996buJVlU,7258
12
- Medfl/LearningManager/strategy.py,sha256=n0asQajkHfGLDX3QbbV5qntQA-xuJZU8Z92XccZENsA,3517
13
- Medfl/LearningManager/utils.py,sha256=vEhkpyC7iLsn4wp1wDh7GzAn5MCJ7T69jkS9lfmKA1Y,9936
14
- Medfl/NetManager/__init__.py,sha256=kR9muJ9fdGMglVmWaraAMiJia_TiTSUcZaNgHS6Cglg,269
15
- Medfl/NetManager/database_connector.py,sha256=JKfFLom7I4zuykb8m7aY4cUYZy4j0-i9w3R_jkPzjXY,1516
16
- Medfl/NetManager/dataset.py,sha256=eEuVzCp5dGD4tvDVKq6jlSReecge7T20ByG4d7_cnXU,2869
17
- Medfl/NetManager/flsetup.py,sha256=CS7531I08eLm6txMIDWFMCIrPP-dNpOLBTaR2BR6X0c,11754
18
- Medfl/NetManager/net_helper.py,sha256=T5Y-03SVskK8oXXIpiXzASyEDPQJbcuGVpIS9FnmzI8,7066
19
- Medfl/NetManager/net_manager_queries.py,sha256=bJ7V6NZAjLM0sEPrczN7vUeB7sMZZzYZjO-rnUCpQPc,4228
20
- Medfl/NetManager/network.py,sha256=D7liCx-1PGx9Z3pctI1_NOGG--gGtvzfr_-BCOdwsOg,7023
21
- Medfl/NetManager/node.py,sha256=Azye74P4ZUDQxPrQOId4BK8hX-9RzFtN2Ji8NXbDCEM,6726
22
- Medfl/scripts/__init__.py,sha256=wAcxrhYRhcTI3CAmCCd4D2psvimuig-DPXQyij0BZT4,45
23
- Medfl/scripts/base.py,sha256=pR7StIt3PpX30aoh53gMkpeNJMHytAPhdc7N09tCITA,781
24
- Medfl/scripts/create_db.py,sha256=PgA6N68iTSfnrt6zy7FDZX2lLjQQ7Ual1Y0efve8gf4,3943
25
- alembic/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
26
- alembic/env.py,sha256=a4zJAzPNLHnIrUlXCqf_8vuAlFu0pceFJJKM1PQaOI4,1649
27
- scripts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
28
- scripts/base.py,sha256=pR7StIt3PpX30aoh53gMkpeNJMHytAPhdc7N09tCITA,781
29
- scripts/config.ini,sha256=tDQQlpwZbCFQuSS017yjEiLglLihp6wETbWtNrSWeAA,82
30
- scripts/create_db.py,sha256=iWE1z33rU_KbIeqoVzdWLhDRLk00TcRf2iYuqpDzOjw,4494
31
- MEDfl-0.1.34.dist-info/METADATA,sha256=Me1TpcUofzpymc1hUwF7TusladrKM9pEX05xMza1nNk,5582
32
- MEDfl-0.1.34.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
33
- MEDfl-0.1.34.dist-info/top_level.txt,sha256=dIL9X8HOFuaVSzpg40DVveDPrymWRoShHtspH7kkjdI,14
34
- MEDfl-0.1.34.dist-info/RECORD,,
scripts/__init__.py DELETED
File without changes
scripts/base.py DELETED
@@ -1,30 +0,0 @@
1
- import mysql.connector
2
- from sqlalchemy import create_engine, text
3
- from configparser import ConfigParser
4
- import yaml
5
- import pkg_resources
6
- import os
7
-
8
- # Get the directory of the current script
9
- current_directory = os.path.dirname(os.path.abspath(__file__))
10
-
11
- # Load configuration from the config file
12
- config_file_path = os.path.join(current_directory, 'db_config.ini')
13
-
14
- config = ConfigParser()
15
- config.read(config_file_path)
16
- mysql_config = config['mysql']
17
-
18
-
19
-
20
- connection_string = (
21
- f"mysql+mysqlconnector://{mysql_config['user']}:{mysql_config['password']}@"
22
- f"{mysql_config['host']}:{mysql_config['port']}/{mysql_config['database']}"
23
- )
24
-
25
- eng = create_engine(
26
- connection_string,
27
- execution_options={"autocommit": True},
28
- )
29
-
30
- my_eng = eng.connect()
scripts/config.ini DELETED
@@ -1,6 +0,0 @@
1
- [mysql]
2
- host = localhost
3
- port = 3306
4
- user = root
5
- password =
6
- database = MEDfl
scripts/create_db.py DELETED
@@ -1,133 +0,0 @@
1
- import sys
2
- import mysql.connector
3
- import pandas as pd
4
- from mysql.connector import Error
5
-
6
- from configparser import ConfigParser
7
- import os
8
-
9
- def main(csv_file_path):
10
- try:
11
- # Get the directory of the current script
12
- current_directory = os.path.dirname(os.path.abspath(__file__))
13
-
14
- # Load configuration from the config file
15
- config_file_path = os.path.join(current_directory, 'db_config.ini')
16
-
17
- config = ConfigParser()
18
- config.read(config_file_path)
19
- mysql_config = config['mysql']
20
-
21
- print('Im here !')
22
-
23
- mydb = mysql.connector.connect(host=mysql_config['host'], user=mysql_config['user'], password=mysql_config['password'])
24
- mycursor = mydb.cursor()
25
-
26
- # Create the 'MEDfl' database if it doesn't exist
27
- mycursor.execute("CREATE DATABASE IF NOT EXISTS MEDfl")
28
-
29
- # Select the 'MEDfl' database
30
- mycursor.execute("USE MEDfl")
31
-
32
- # Get the list of all tables in the database
33
- mycursor.execute("SHOW TABLES")
34
- tables = mycursor.fetchall()
35
-
36
- # Drop each table one by one
37
- for table in tables:
38
- table_name = table[0]
39
- mycursor.execute(f"DROP TABLE IF EXISTS {table_name}")
40
-
41
- # Create Networks table
42
- mycursor.execute(
43
- "CREATE TABLE Networks( \
44
- NetId INT NOT NULL AUTO_INCREMENT, \
45
- NetName VARCHAR(255), \
46
- PRIMARY KEY (NetId) \
47
- );"
48
- )
49
-
50
- # Create FLsetup table
51
- mycursor.execute("CREATE TABLE FLsetup (\
52
- FLsetupId int NOT NULL AUTO_INCREMENT,\
53
- name varchar(255) NOT NULL, \
54
- description varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,\
55
- creation_date datetime NOT NULL,\
56
- NetId int NOT NULL,\
57
- column_name varchar(255) DEFAULT NULL,\
58
- PRIMARY KEY (`FLsetupId`) \
59
- )")
60
-
61
- # Create Nodes table
62
- mycursor.execute("CREATE TABLE Nodes ( \
63
- NodeId int NOT NULL AUTO_INCREMENT,\
64
- NodeName varchar(255) DEFAULT NULL,\
65
- train tinyint(1) DEFAULT '1',\
66
- NetId int DEFAULT NULL,\
67
- PRIMARY KEY (NodeId)\
68
- )")
69
-
70
- data_df = pd.read_csv(csv_file_path)
71
- columns = data_df.columns.tolist()
72
- column_map = {"object": "VARCHAR(255)", "int64": "INT", "float64": "FLOAT"}
73
- sub_query = "".join(f"{col} {column_map[str(data_df[col].dtype)]}," for col in columns)
74
-
75
- # Create Datasets table by getting columns from the master csv file
76
- mycursor.execute(
77
- f"CREATE TABLE DataSets( \
78
- DataSetId INT NOT NULL AUTO_INCREMENT, \
79
- DataSetName VARCHAR(255), \
80
- NodeId INT CHECK (NodeId = -1 OR NodeId IS NOT NULL),\
81
- {sub_query}\
82
- PRIMARY KEY (DataSetId)\
83
- )"
84
- )
85
-
86
- # Create FLpipeline table
87
- mycursor.execute("CREATE TABLE FLpipeline(\
88
- id int NOT NULL AUTO_INCREMENT,\
89
- name varchar(255) NOT NULL, \
90
- description varchar(255) NOT NULL,\
91
- creation_date datetime NOT NULL,\
92
- results longtext NOT NULL,\
93
- PRIMARY KEY (id)\
94
- ) ")
95
-
96
- # Create test results table
97
- mycursor.execute("CREATE TABLE testResults(\
98
- pipelineId INT,\
99
- nodename VARCHAR(100) NOT NULL, \
100
- confusionmatrix VARCHAR(255),\
101
- accuracy LONG,\
102
- sensivity LONG,\
103
- ppv LONG,\
104
- npv LONG,\
105
- f1score LONG,\
106
- fpr LONG,\
107
- tpr LONG, \
108
- PRIMARY KEY (pipelineId , nodename)\
109
- ) ")
110
-
111
- # Create FederatedDataset table
112
- mycursor.execute("CREATE TABLE FedDatasets (\
113
- FedId int NOT NULL AUTO_INCREMENT,\
114
- FLsetupId int DEFAULT NULL,\
115
- FLpipeId int DEFAULT NULL,\
116
- name varchar(255) NOT NULL,\
117
- PRIMARY KEY (FedId)\
118
- )")
119
-
120
- # Commit and close the cursor
121
- mydb.commit()
122
- mycursor.close()
123
- mydb.close()
124
-
125
- except Error as e:
126
- print(f"Error: {e}")
127
-
128
- if __name__ == "__main__":
129
- if len(sys.argv) != 2:
130
- print("Usage: python script.py <path_to_csv_file>")
131
- sys.exit(1)
132
- csv_file_path = sys.argv[1]
133
- main(csv_file_path)
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
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes