Skip to content

Commit

Permalink
Merge pull request FederatedAI#541 from FederatedAI/contributor_1.0_d…
Browse files Browse the repository at this point in the history
…ocker

Fix KFold and model_base bugs
  • Loading branch information
dylan-fan authored Sep 4, 2019
2 parents 912163c + 06a4b29 commit 9661774
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion federatedml/model_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def _run_data(self, data_sets=None, stage=None):
eval_data_output = eval_data_output.mapValues(lambda value: value + ["validation"])

if self.data_output and eval_data_output:
self.data_output.union(eval_data_output)
self.data_output = self.data_output.union(eval_data_output)
elif not self.data_output and eval_data_output:
self.data_output = eval_data_output

Expand Down
4 changes: 2 additions & 2 deletions federatedml/model_selection/KFold.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,13 +183,13 @@ def _synchronize_data(self, data_instance, flowid, data_application=None):
name=transfer_id.name,
tag=transfer_variable.generate_transferid(transfer_id, flowid),
role=consts.HOST,
idx=0)
idx=-1)
LOGGER.info("remote {} to host".format(data_application))
return None
elif self.role == consts.HOST:
data_sid = federation.get(name=transfer_id.name,
tag=transfer_variable.generate_transferid(transfer_id, flowid),
idx=-1)
idx=0)

LOGGER.info("get {} from guest".format(data_application))
join_data_insts = data_sid.join(data_instance, lambda s, d: d)
Expand Down

0 comments on commit 9661774

Please sign in to comment.