Skip to content

Commit

Permalink
Merge pull request FederatedAI#526 from FederatedAI/feature-1.0.1-sup…
Browse files Browse the repository at this point in the history
…port_dataset_in_version

Feature 1.0.1 support dataset in version
  • Loading branch information
dylan-fan authored Sep 3, 2019
2 parents acb0f8d + 1ec273e commit 4e22c0e
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
3 changes: 2 additions & 1 deletion arch/api/utils/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ def generate_table_name(input_file_path):
table_name = _table_name
eggroll.init(job_id=args.job_id, mode=work_mode)
input_data = read_data(input_file_path, table_name, namespace, head)
data_table = storage.save_data(input_data, name=table_name, namespace=namespace, partition=partition)
in_version = job_config.get('in_version', False)
data_table = storage.save_data(input_data, name=table_name, namespace=namespace, partition=partition, in_version=in_version)
print("------------load data finish!-----------------")
print("file: {}".format(input_file_path))
print("total data_count: {}".format(data_table.count()))
Expand Down
4 changes: 0 additions & 4 deletions arch/api/utils/version_control.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,3 @@ def get_commit_tmp_table(data_table_namespace):
partition=1, create_if_missing=True, error_if_exist=False)
return version_tmp_table


def get_id_library_table_name():
id_library_info = eggroll.table('info', 'id_library', partition=10, create_if_missing=True, error_if_exist=False)
return id_library_info.get("use_data_id")
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ coordinator=webank
ip=127.0.0.1
port=8000
workMode=0
serviceRoleName=serving
inferenceWorkerThreadNum=10
#storage
# maybe python/data/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,12 @@ protected ReturnResult getFederatedPredictFromRemote(Context context,FederatedP

metaDataBuilder.setSrc(
topicBuilder.setPartyId(String.valueOf(srcParty.getPartyId())).
setRole("serving")
setRole(Configuration.getProperty("serviceRoleName", "serving"))
.setName("partnerPartyName")
.build());
metaDataBuilder.setDst(
topicBuilder.setPartyId(String.valueOf(dstParty.getPartyId()))
.setRole("serving")
.setRole(Configuration.getProperty("serviceRoleName", "serving"))
.setName("partyName")
.build());
metaDataBuilder.setCommand(Proxy.Command.newBuilder().setName("federatedInference").build());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ coordinator=webank
ip=127.0.0.1
port=8000
workMode=0
serviceRoleName=serving
inferenceWorkerThreadNum=10
#storage
# maybe python/data/
Expand Down

0 comments on commit 4e22c0e

Please sign in to comment.