-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
447 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
client_configs: | ||
train_configs: | ||
# Local trainer | ||
trainer: "IIADMMTrainer" | ||
mode: "step" | ||
num_local_steps: 100 | ||
optim: "Adam" | ||
optim_args: | ||
lr: 0.001 | ||
# Algorithm specific | ||
accum_grad: True | ||
coeff_grad: False | ||
init_penalty: 100.0 | ||
residual_balancing: | ||
res_on: False | ||
res_on_every_update: False | ||
tau: 1.1 | ||
mu: 10 | ||
# Loss function | ||
loss_fn_path: "./loss/celoss.py" | ||
loss_fn_name: "CELoss" | ||
# Client validation | ||
do_validation: True | ||
do_pre_validation: True | ||
pre_validation_interval: 1 | ||
metric_path: "./metric/acc.py" | ||
metric_name: "accuracy" | ||
# Differential privacy | ||
use_dp: False | ||
epsilon: 1 | ||
clip_grad: False | ||
clip_value: 1 | ||
clip_norm: 1 | ||
# Data loader | ||
train_batch_size: 64 | ||
val_batch_size: 64 | ||
train_data_shuffle: True | ||
val_data_shuffle: False | ||
|
||
model_configs: | ||
model_path: "./model/cnn.py" | ||
model_name: "CNN" | ||
model_kwargs: | ||
num_channel: 1 | ||
num_classes: 10 | ||
num_pixel: 28 | ||
|
||
comm_configs: | ||
compressor_configs: | ||
enable_compression: False | ||
# Used if enable_compression is True | ||
lossy_compressor: "SZ2" | ||
lossless_compressor: "blosc" | ||
error_bounding_mode: "REL" | ||
error_bound: 1e-3 | ||
flat_model_dtype: "np.float32" | ||
param_cutoff: 1024 | ||
|
||
server_configs: | ||
scheduler: "SyncScheduler" | ||
scheduler_kwargs: | ||
num_clients: 2 | ||
same_init_model: True | ||
aggregator: "IIADMMAggregator" | ||
aggregator_kwargs: | ||
num_clients: 2 | ||
device: "cpu" | ||
num_global_epochs: 10 | ||
server_validation: False | ||
logging_output_dirname: "./output" | ||
logging_output_filename: "result" | ||
comm_configs: | ||
grpc_configs: | ||
server_uri: localhost:50051 | ||
max_message_size: 1048576 | ||
use_ssl: False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
from .base_trainer import BaseTrainer | ||
from .naive_trainer import NaiveTrainer | ||
from .iiadmm_trainer import IIADMMTrainer | ||
from .iceadmm_trainer import ICEADMMTrainer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.