예제 #1
0
def model_scatter_call(job_id, role, ind, *args):
    models = args[0]
    if role == consts.ARBITER:
        models = model_scatter.Server().get_models()
        return list(models)
    elif role == consts.HOST:
        model = models[ind + 1]
        return model_scatter.Client().send_model(model)
    else:
        model = models[0]
        return model_scatter.Client().send_model(model)
예제 #2
0
파일: aggregator.py 프로젝트: zpskt/FATE
 def __init__(self, trans_var: AggregatorTransVar = None):
     if trans_var is None:
         trans_var = AggregatorTransVar()
     self._model_broadcaster = model_broadcaster.Client(
         trans_var=trans_var.model_broadcaster)
     self._model_scatter = model_scatter.Client(
         trans_var=trans_var.model_scatter)
예제 #3
0
    def __init__(self, trans_var=LegacyAggregatorTransVar()):
        self._enable_secure_aggregate = False

        self._loss_sync = loss_scatter.Client(trans_var.loss_scatter)
        self._converge_sync = has_converged.Client(trans_var.has_converged)
        self._model_scatter = model_scatter.Client(trans_var.model_scatter)
        self._model_broadcaster = model_broadcaster.Client(
            trans_var.model_broadcaster)
        self._random_padding_cipher = random_padding_cipher.Client(
            trans_var.random_padding_cipher)