Skip to content

Commit

Permalink
Set consistent_label_distribution to True (#584)
Browse files Browse the repository at this point in the history
* set consistent_label_distribution to True

* Update README.md
  • Loading branch information
rayrayraykk authored Apr 26, 2023
1 parent 3ff4664 commit b372410
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion federatedscope/core/configs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ The configurations related to the data/dataset are defined in `cfg_data.py`.
| `data.server_holds_all` | (bool) False | Only use in global mode, whether the server (workers with idx 0) holds all data, useful in global training/evaluation case | - |
| `data.subsample` | (float) 1.0 |  Only used in LEAF datasets, subsample clients from all clients | - |
| `data.splits` | (list) [0.8, 0.1, 0.1] | Train, valid, test splits | - |
| `data.` </br>`consistent_label_distribution` | (bool) False | Make label distribution of train/val/test set over clients keep consistent during splitting | - |
| `data.` </br>`consistent_label_distribution` | (bool) True | Make label distribution of train/val/test set over clients keep consistent during splitting | - |
| `data.cSBM_phi` | (list) [0.5, 0.5, 0.5] | Phi for cSBM graph dataset | - |
| `data.loader` | (string) '' | Graph sample name, used in minibatch trainer | 'graphsaint-rw': use `GraphSAINTRandomWalkSampler` as DataLoader; 'neighbor': use `NeighborSampler` as DataLoader. |
| `dataloader.num_workers` | (int) 0 | num_workers in DataLoader | - |
Expand Down
2 changes: 1 addition & 1 deletion federatedscope/core/configs/cfg_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def extend_data_cfg(cfg):
# idx 0) holds all data, useful in global training/evaluation case
cfg.data.subsample = 1.0
cfg.data.splits = [0.8, 0.1, 0.1] # Train, valid, test splits
cfg.data.consistent_label_distribution = False # If True, the label
cfg.data.consistent_label_distribution = True # If True, the label
# distributions of train/val/test set over clients will be kept
# consistent during splitting
cfg.data.cSBM_phi = [0.5, 0.5, 0.5]
Expand Down

0 comments on commit b372410

Please sign in to comment.