Skip to content

Commit

Permalink
Merge branch 'miyurud:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
muthumala19 authored Dec 9, 2024
2 parents 8042bb9 + bcbae83 commit 77bdf05
Show file tree
Hide file tree
Showing 13 changed files with 91 additions and 2 deletions.
4 changes: 2 additions & 2 deletions conf/jasminegraph-server.properties
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ org.jasminegraph.scheduler.performancecollector.timing=30
#--------------------------------------------------------------------------------
#PerformanceCollector
#--------------------------------------------------------------------------------
org.jasminegraph.collector.pushgateway=http://192.168.43.135:9091/
org.jasminegraph.collector.prometheus=http://192.168.43.135:9090/
org.jasminegraph.collector.pushgateway=http://172.28.5.1:9091/
org.jasminegraph.collector.prometheus=http://172.28.5.2:9090/

#--------------------------------------------------------------------------------
#MetaDB information
Expand Down
14 changes: 14 additions & 0 deletions conf/prometheus.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
global:
scrape_interval: 15s
external_labels:
monitor: "codelab-monitor"
scrape_configs:
- job_name: "prometheus"
scrape_interval: 5s
static_configs:
- targets: ["localhost:9090"]

- job_name: "pushgateway"
scrape_interval: 2s
static_configs:
- targets: ["172.28.5.3"]
45 changes: 45 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
services:
jasminegraph:
image: jasminegraph:latest
ports:
- '7777:7777'
- '7778:7778'
volumes:
- '/var/run/docker.sock:/var/run/docker.sock:rw'
- './env/databases/metadb:/home/ubuntu/software/jasminegraph/metadb'
- './env/databases/performancedb:/home/ubuntu/software/jasminegraph/performancedb'
- './env/data:/var/tmp/data'
- '/tmp/jasminegraph:/tmp/jasminegraph'
networks:
- jasminenet
command: --MODE 1 --MASTERIP 172.28.5.1 --WORKERS 2 --WORKERIP 172.28.5.1 --ENABLE_NMON false
depends_on:
- prometheus
prometheus:
image: prom/prometheus:latest
ports:
- 9090:9090
volumes:
- './conf/prometheus.yaml:/etc/prometheus/prometheus.yml'
networks:
jasminenet:
ipv4_address: 172.28.5.2
depends_on:
- pushgateway
pushgateway:
image: prom/pushgateway
ports:
- 9091:9091
networks:
jasminenet:
ipv4_address: 172.28.5.3
networks:
jasminenet:
external: false
name: jasminenet
driver: bridge
ipam:
config:
- subnet: 172.28.5.0/24
ip_range: 172.28.5.0/24
gateway: 172.28.5.1
3 changes: 3 additions & 0 deletions src/server/JasmineGraphInstanceService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ limitations under the License.

#include "JasmineGraphInstanceService.h"

#include <signal.h>
#include <stdio.h>
#include <unistd.h>

Expand Down Expand Up @@ -1980,6 +1981,8 @@ static inline void close_command(int connFd, bool *loop_exit_p) {

static inline void shutdown_command(int connFd) {
close(connFd);
pid_t ppid = getppid();
kill(ppid, SIGTERM);
exit(0);
}

Expand Down
1 change: 1 addition & 0 deletions src_python/fl_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ class Client:
(Without partition sheduling)
"""

#pylint: disable=too-many-positional-arguments
def __init__(self, model, graph_params, weights_path, graph_id, partition_id, epochs=10,
ip=socket.gethostname(), port=5000, header_length=10):

Expand Down
1 change: 1 addition & 0 deletions src_python/fl_client_shed.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ class Client:
on a given GCN model (With partition sheduling)
"""

#pylint: disable=too-many-positional-arguments
def __init__(self, client_id, weights_path, graph_id, partition_ids, epochs=10,
ip=socket.gethostname(), port=5000, header_length=10):

Expand Down
1 change: 1 addition & 0 deletions src_python/fl_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class Server:
learning process (Without partition sheduling)
"""

#pylint: disable=too-many-positional-arguments
def __init__(self, model, rounds, weights_path, graph_id, max_conn=2, ip=socket.gethostname(),
port=5000, header_length=10):

Expand Down
1 change: 1 addition & 0 deletions src_python/fl_server_shed.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class Server:
learning process (With partition sheduling)
"""

#pylint: disable=too-many-positional-arguments
def __init__(self, model_weights, rounds, weights_path, graph_id, num_clients=2,
ip=socket.gethostname(), port=5000, header_length=10):

Expand Down
1 change: 1 addition & 0 deletions src_python/org_agg.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class Aggregator:
"""Aggregator
"""

#pylint: disable=too-many-positional-arguments
def __init__(self, model, rounds, num_orgs, ip, port):

# Parameters
Expand Down
1 change: 1 addition & 0 deletions src_python/org_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class Server:
"""Server
"""

#pylint: disable=too-many-positional-arguments
def __init__(self, org_id, model_weights, rounds, num_clients, ip, port):

# Parameters
Expand Down
2 changes: 2 additions & 0 deletions start-docker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
docker compose up -d jasminegraph prometheus &
16 changes: 16 additions & 0 deletions stop-docker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

# Variables
HOST="localhost"
PORT="7777"

# Establish telnet connection and send command
(
sleep 5
echo "shdn"
sleep 5
echo "exit"
sleep 5
) | telnet "$HOST" "$PORT"

docker compose stop prometheus pushgateway &
3 changes: 3 additions & 0 deletions test-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -169,4 +169,7 @@ fi

stop_and_remove_containers
force_remove "${TEST_ROOT}/env" "${WORKER_LOG_DIR}"
if [ "$exit_code" = '0' ]; then
docker tag jasminegraph:test jasminegraph:latest
fi
exit "$exit_code"

0 comments on commit 77bdf05

Please sign in to comment.