diff --git a/federatedscope/autotune/run.py b/federatedscope/autotune/run.py index 61a931859..bdb2d27b6 100644 --- a/federatedscope/autotune/run.py +++ b/federatedscope/autotune/run.py @@ -1,4 +1,13 @@ def run_scheduler(scheduler, cfg, client_cfgs=None): + """ + This function is to optimize FedHPO problem by scheduler. The method is + decided by `cfg.hpo.scheduler`. + Args: + scheduler: Scheduler for conducting serval FS runs, \ + see ``federatedscope.autotune.algos.Scheduler`` + cfg: The configurations of the FL course. + client_cfgs: The clients' configurations. + """ if cfg.hpo.scheduler in ['sha', 'wrap_sha']: _ = scheduler.optimize() elif cfg.hpo.scheduler in [ diff --git a/federatedscope/autotune/smac.py b/federatedscope/autotune/smac.py index 350ded436..067f53147 100644 --- a/federatedscope/autotune/smac.py +++ b/federatedscope/autotune/smac.py @@ -15,6 +15,14 @@ def run_smac(cfg, scheduler, client_cfgs=None): perfs = [] def optimization_function_wrapper(config): + """ + Used as an evaluation function for SMAC optimizer. + Args: + config: configurations of FS run. + + Returns: + Best results of server of specific FS run. + """ budget = cfg.hpo.sha.budgets[-1] results = eval_in_fs(cfg, config, budget, client_cfgs) key1, key2 = cfg.hpo.metric.split('.') diff --git a/federatedscope/core/feature/vfl/preprocess/instance_norm.py b/federatedscope/core/feature/vfl/preprocess/instance_norm.py index a38d10948..1d6779d01 100644 --- a/federatedscope/core/feature/vfl/preprocess/instance_norm.py +++ b/federatedscope/core/feature/vfl/preprocess/instance_norm.py @@ -10,7 +10,7 @@ def wrap_instance_norm_server(worker): """ - This function is to perform instance norm vfl tabular data for server. + This function is to perform instance norm on vfl tabular data for server. Args: worker: ``federatedscope.core.workers.Worker`` to be wrapped