MEDfl 2.0.4.dev4__py3-none-any.whl → 2.0.4.dev5__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.
@@ -214,10 +214,11 @@ class Model:
214
214
  torch.nn.Module: Loaded PyTorch model.
215
215
  """
216
216
  # Ensure models are loaded onto the CPU when CUDA is not available
217
+ torch_kwargs = {"weights_only": False}
217
218
  if torch.cuda.is_available():
218
- loaded_model = torch.load(model_path)
219
+ loaded_model = torch.load(model_path , **torch_kwargs)
219
220
  else:
220
- loaded_model = torch.load(model_path, map_location=torch.device('cpu'))
221
+ loaded_model = torch.load(model_path, map_location=torch.device('cpu') , **torch_kwargs)
221
222
  return loaded_model
222
223
 
223
224
 
@@ -113,7 +113,7 @@ def custom_classification_report(y_true, y_pred_prob):
113
113
 
114
114
  auc = roc_auc_score(y_true, y_pred_prob) # Calculate AUC
115
115
 
116
- tn, fp, fn, tp = confusion_matrix(y_true, y_pred).ravel()
116
+ tn, fp, fn, tp = confusion_matrix(y_true, y_pred , labels=[0, 1]).ravel()
117
117
 
118
118
  # Accuracy
119
119
  denominator_acc = tp + tn + fp + fn
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: MEDfl
3
- Version: 2.0.4.dev4
3
+ Version: 2.0.4.dev5
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
@@ -28,13 +28,14 @@ Requires-Dist: Sphinx~=5.3.0
28
28
  Requires-Dist: SQLAlchemy~=1.4.47
29
29
  Requires-Dist: torch>=2.0.0
30
30
  Requires-Dist: datetime~=5.1
31
- Requires-Dist: scikit-learn~=1.6.1
31
+ Requires-Dist: scikit-learn~=1.2.2
32
32
  Requires-Dist: sphinx-jsonschema==1.19.1
33
33
  Requires-Dist: sphinx-rtd-dark-mode==1.2.4
34
34
  Requires-Dist: plotly==5.19.0
35
35
  Requires-Dist: optuna==3.5.0
36
36
  Requires-Dist: mysql-connector-python~=9.3.0
37
37
  Requires-Dist: seaborn~=0.13.2
38
+ Requires-Dist: flwr[simulation]
38
39
 
39
40
  # MEDfl: Federated Learning and Differential Privacy Simulation Tool for Tabular Data
40
41
  ![Python Versions](https://img.shields.io/badge/python-3.9-blue)
@@ -4,13 +4,13 @@ MEDfl/LearningManager/client.py,sha256=9Y_Zb0yxvCxx3dVCPQ1bXS5mCKasylSBnoVj-RDN2
4
4
  MEDfl/LearningManager/dynamicModal.py,sha256=q8u7xPpj_TdZnSr8kYj0Xx7Sdz-diXsKBAfVce8-qSU,10534
5
5
  MEDfl/LearningManager/federated_dataset.py,sha256=InsZ5Rys2dgqaPxVyP5G3TrJMwiCNHOoTd3tCpUwUVM,2081
6
6
  MEDfl/LearningManager/flpipeline.py,sha256=5lT2uod5EqnkRQ04cgm0gYyZz0djumfIYipCrzX1fdo,7111
7
- MEDfl/LearningManager/model.py,sha256=vp8FIMxBdz3FTF5wJaea2IO_WGeANLZgBxTKVe3gW3Q,7456
7
+ MEDfl/LearningManager/model.py,sha256=OZcVzIJ_Q5JMF8TfvqtY34FgeNZOqTocENmDKppQEmA,7537
8
8
  MEDfl/LearningManager/params.yaml,sha256=Ix1cNtlWr3vDC0te6pipl5w8iLADO6dZvwm633-VaIA,436
9
9
  MEDfl/LearningManager/params_optimiser.py,sha256=8e0gCt4imwQHlNSJ3A2EAuc3wSr6yfSI6JDghohfmZQ,17618
10
10
  MEDfl/LearningManager/plot.py,sha256=A6Z8wC8J-H-OmWBPKqwK5eiTB9vzOBGMaFv1SaNA9Js,7698
11
11
  MEDfl/LearningManager/server.py,sha256=oTgW3K1UT6m4SQBk23FIf23km_BDq9vvjeC6OgY8DNw,7077
12
12
  MEDfl/LearningManager/strategy.py,sha256=BHXpwmt7jx07y45YLUs8FZry2gYQbpiV4vNbHhsksQ4,3435
13
- MEDfl/LearningManager/utils.py,sha256=B4RULJp-puJr724O6teI0PxnUyPV8NG-uPC6jqaiDKI,9605
13
+ MEDfl/LearningManager/utils.py,sha256=zk84uKR_iSsoz1uvKD-l4_jJWV3_5pfUWMIeLNcT1mU,9621
14
14
  MEDfl/NetManager/__init__.py,sha256=OpgsIiBg7UA6Bfnu_kqGfEPxU8JfpPxSFU98TOeDTP0,273
15
15
  MEDfl/NetManager/database_connector.py,sha256=L46vgTuQIzuk4PVWB7Mo1THX4aerIlIlAU5ZTIVGLs8,1553
16
16
  MEDfl/NetManager/dataset.py,sha256=HTV0jrJ4Qlhl2aSJzdFU1lkxGBKtmJ390eBpwfKf_4o,2777
@@ -29,8 +29,8 @@ MEDfl/scripts/base.py,sha256=QrmG7gkiPYkAy-5tXxJgJmOSLGAKeIVH6i0jq7G9xnA,752
29
29
  MEDfl/scripts/create_db.py,sha256=MnFtZkTueRZ-3qXPNX4JsXjOKj-4mlkxoRhSFdRcvJw,3817
30
30
  alembic/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
31
31
  alembic/env.py,sha256=-aSZ6SlJeK1ZeqHgM-54hOi9LhJRFP0SZGjut-JnY-4,1588
32
- MEDfl-2.0.4.dev4.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
33
- MEDfl-2.0.4.dev4.dist-info/METADATA,sha256=0nPl8L3hF9N_bUQ7SD8I6lDo0ZJcR1DrYU1RIdFbKOg,4326
34
- MEDfl-2.0.4.dev4.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
35
- MEDfl-2.0.4.dev4.dist-info/top_level.txt,sha256=dIL9X8HOFuaVSzpg40DVveDPrymWRoShHtspH7kkjdI,14
36
- MEDfl-2.0.4.dev4.dist-info/RECORD,,
32
+ MEDfl-2.0.4.dev5.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
33
+ MEDfl-2.0.4.dev5.dist-info/METADATA,sha256=rYlywNl8wr5CZiebY_qsA5iDemHvVyH6WOgou_-KAuw,4358
34
+ MEDfl-2.0.4.dev5.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
35
+ MEDfl-2.0.4.dev5.dist-info/top_level.txt,sha256=dIL9X8HOFuaVSzpg40DVveDPrymWRoShHtspH7kkjdI,14
36
+ MEDfl-2.0.4.dev5.dist-info/RECORD,,