Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Miyuru Dayarathna <[email protected]>
  • Loading branch information
Ishad-M-I-M and miyurud committed Sep 4, 2023
1 parent 43219e5 commit 5d4792e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ RUN pip install pandas
COPY ./build.sh ./build.sh
COPY ./run-docker.sh ./run-docker.sh
COPY ./CMakeLists.txt ./CMakeLists.txt
COPY ./src_python ./src-python
COPY ./src_python ./src_python
COPY ./main.h ./main.h
COPY ./main.cpp ./main.cpp
COPY ./src ./src
Expand Down
6 changes: 3 additions & 3 deletions conf/jasminegraph-server.properties
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ org.jasminegraph.server.modelDir=/var/tmp/jasminegraph-localstore/models/
#--------------------------------------------------------------------------------

org.jasminegraph.federated.enabled=true
org.jasminegraph.fl.location=/home/ubuntu/software/jasminegraph/src-python/
org.jasminegraph.fl.dataDir=/home/ubuntu/software/jasminegraph/src-python/data/
org.jasminegraph.fl.weights=/home/ubuntu/software/jasminegraph/src-python/weights/
org.jasminegraph.fl.location=/home/ubuntu/software/jasminegraph/src_python/
org.jasminegraph.fl.dataDir=/home/ubuntu/software/jasminegraph/src_python/data/
org.jasminegraph.fl.weights=/home/ubuntu/software/jasminegraph/src_python/weights/
org.jasminegraph.fl_clients=2
org.jasminegraph.fl.epochs=4
org.jasminegraph.fl.rounds=4
Expand Down
12 changes: 6 additions & 6 deletions src/server/JasmineGraphInstanceService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1690,7 +1690,7 @@ void *instanceservicesession(void *dummyPt) {
string trainData(data);

std::vector<std::string> trainargs = Utils::split(trainData, ' ');
instance_logger.info("Train Data : " + trainData);
instance_logger.info("Received options : " + trainData);
string graphID;
string partitionID = trainargs[trainargs.size() - 1];

Expand Down Expand Up @@ -1762,7 +1762,7 @@ void *instanceservicesession(void *dummyPt) {
string trainData(data);

std::vector<std::string> trainargs = Utils::split(trainData, ' ');
instance_logger.info("Train Data : " + trainData);
instance_logger.info("Received options : " + trainData);
string graphID;
string partitionID = trainargs[trainargs.size() - 1];

Expand Down Expand Up @@ -3170,7 +3170,7 @@ void JasmineGraphInstanceService::trainPartition(string trainData) {
std::transform(trainargs.begin(), trainargs.end(), std::back_inserter(vc), converter);

std::string path = "cd " + utils.getJasmineGraphProperty("org.jasminegraph.graphsage") + " && ";
std::string command = path + "python3.11 -m unsupervised_train > /home/ubuntu/software/jasminegraph/logs/unspervised_train" + partitionID + "-" + Utils::getCurrentTimestamp() + ".txt" ;
std::string command = path + "python3.11 -m unsupervised_train > /home/ubuntu/software/jasminegraph/logs/unsupervised_train" + partitionID + "-" + Utils::getCurrentTimestamp() + ".txt" ;

int argc = trainargs.size();
for (int i = 0; i < argc - 2; ++i) {
Expand Down Expand Up @@ -4489,7 +4489,7 @@ void JasmineGraphInstanceService::initServer(string trainData){
+ " " + utils.getJasmineGraphProperty("org.jasminegraph.fl.dataDir")+ " "+ graphID + " 0 "
+ utils.getJasmineGraphProperty("org.jasminegraph.fl_clients")
+ " " + utils.getJasmineGraphProperty("org.jasminegraph.fl.epochs") +" localhost 5000 > "
+ "/home/ubuntu/software/jasminegraph/logs/server_logs" + Utils::getCurrentTimestamp() + ".txt";
+ "/home/ubuntu/software/jasminegraph/logs/server_logs-" + Utils::getCurrentTimestamp() + ".txt";
instance_logger.log("Executing : " + command, "info");
popen(command.c_str(), "r");
}
Expand All @@ -4513,7 +4513,7 @@ void JasmineGraphInstanceService::initOrgServer(string trainData){
std::string path = "cd " + utils.getJasmineGraphProperty("org.jasminegraph.fl.location") + " && ";
std::string command = path + "python3.11 org_server.py " + graphID+ " " + utils.getJasmineGraphProperty("org.jasminegraph.fl_clients")
+ " " + utils.getJasmineGraphProperty("org.jasminegraph.fl.epochs")
+" localhost 5050 > /home/ubuntu/software/jasminegraph/logs/org_server_logs" + Utils::getCurrentTimestamp() + ".txt";
+" localhost 5050 > /home/ubuntu/software/jasminegraph/logs/org_server_logs-" + Utils::getCurrentTimestamp() + ".txt";
instance_logger.log("Executing : " + command, "info");
popen(command.c_str(), "r");
}
Expand All @@ -4540,7 +4540,7 @@ void JasmineGraphInstanceService::initAgg(string trainData){
+ " " + utils.getJasmineGraphProperty("org.jasminegraph.fl.dataDir")+ " " + "4" + " 0 "
+ utils.getJasmineGraphProperty("org.jasminegraph.fl.num.orgs")
+ " " + utils.getJasmineGraphProperty("org.jasminegraph.fl.epochs") +" localhost 5000 > "
+ "/home/ubuntu/software/jasminegraph/logs/agg_logs" + Utils::getCurrentTimestamp() + ".txt";
+ "/home/ubuntu/software/jasminegraph/logs/agg_logs-" + Utils::getCurrentTimestamp() + ".txt";
instance_logger.log("Executing : " + command, "info");
popen(command.c_str(), "r");
}
Expand Down

0 comments on commit 5d4792e

Please sign in to comment.