-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NerlMonitor #236
base: master
Are you sure you want to change the base?
NerlMonitor #236
Changes from all commits
99b39d0
b660a34
afe543b
054e573
ae13017
253c187
79a0e06
b303eec
991b342
ac2fc31
4021fcf
9ad8cde
9e76992
86f32e4
6ef37b8
3aa8bab
3dcf863
5e45ba8
afb9e94
c79f1d6
3943ccb
a53dd31
6024cc4
e2ee54b
2173654
3aa34ab
d86129d
748d94b
298dea9
df3c017
5c10a93
874136e
431ff90
aa48eae
594d77b
61c9a9a
eda9e96
102a6f2
aea1796
cb4196e
06507ed
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
|
||
MONITOR_PATH="src_erl/NerlMonitor" | ||
GUI_PATH="src_erl/NerlMonitor/src" | ||
|
||
echo "NerlnetMonitor Activated" | ||
|
||
|
||
cd $MONITOR_PATH | ||
rebar3 shell --name [email protected] --setcookie COOKIE | ||
|
||
cd ../../ |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,4 +76,4 @@ Minimum Python version: 3.8 | |
4. Run Jupyter notebook with ```jupyter-notebook``` and create a new notebook in the created dir from step 3. | ||
5. Follow the example: https://github.com/leondavi/NErlNet/blob/master/examples/example_run.ipynb | ||
|
||
Contact Email: [email protected] | ||
Contact Email: [email protected] | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"Features": 784, | ||
"Labels": ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], | ||
"CSV path": "mnist", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @halfway258 Please approve this change |
||
"CSV path": "mnist-o", | ||
"Batches per source": | ||
{ | ||
"Training": 10000, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do you touch src_cpp at all? |
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -176,6 +176,18 @@ handle_cast({getStats,_Body}, State = #router_genserver_state{myName = MyName, | |
nerl_tools:http_request(Host,Port,"routerStats",Mes), | ||
{noreply, State#router_genserver_state{msgCounter = MsgCounter+1}}; | ||
|
||
handle_cast({worker_kill , Body} , State = #router_genserver_state{msgCounter = MsgCounter, myName = MyName}) -> | ||
io:format("Body is ~p~n",[binary_to_term(Body)]), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. io:format is forbidden! |
||
{ClientName , _} = binary_to_term(Body), | ||
nerl_tools:sendHTTP(MyName, ClientName, "worker_kill", Body), | ||
{noreply, State#router_genserver_state{msgCounter = MsgCounter+1}}; | ||
|
||
|
||
%monitor | ||
handle_cast({worker_down,Body}, State = #router_genserver_state{myName = MyName, msgCounter = MsgCounter, nerlnetGraph = NerlnetGraph}) -> | ||
nerl_tools:sendHTTP(MyName, ?MAIN_SERVER_ATOM, "worker_down", Body), | ||
{noreply, State#router_genserver_state{msgCounter = MsgCounter+1}}; | ||
|
||
|
||
handle_cast(_Request, State = #router_genserver_state{msgCounter = MsgCounter }) -> | ||
{noreply, State#router_genserver_state{msgCounter = MsgCounter+1}}. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -187,7 +187,8 @@ createClientsAndWorkers() -> | |
{"/clientTraining",clientStateHandler, [training,ClientStatemPid]}, | ||
{"/clientIdle",clientStateHandler, [idle,ClientStatemPid]}, | ||
{"/clientPredict",clientStateHandler, [predict,ClientStatemPid]}, | ||
{"/weightsVector",clientStateHandler, [vector,ClientStatemPid]} | ||
{"/weightsVector",clientStateHandler, [vector,ClientStatemPid]}, | ||
{"/worker_kill" , clientStateHandler , [worker_kill , ClientStatemPid]} | ||
]} | ||
]), | ||
init_cowboy_start_clear(Client, {HostName, Port},NerlClientDispatch) | ||
|
@@ -265,7 +266,10 @@ createRouters(MapOfRouters, HostName) -> | |
{"/federatedWeights",routingHandler, [federatedWeights,RouterGenServerPid]}, | ||
|
||
%%GUI actions | ||
{"/getStats",routingHandler, [getStats,RouterGenServerPid]} | ||
{"/getStats",routingHandler, [getStats,RouterGenServerPid]}, | ||
%monitor actions | ||
{"/worker_down",routingHandler, [worker_down,RouterGenServerPid]}, | ||
{"/worker_kill" , routingHandler , [worker_kill , RouterGenServerPid]} | ||
]} | ||
]), | ||
%% cowboy:start_clear(Name, TransOpts, ProtoOpts) - an http_listener | ||
|
@@ -304,7 +308,9 @@ createMainServer(true,BatchSize,HostName) -> | |
%GUI actions | ||
{"/getGraph",[],guiHandler, [getGraph, MainGenServerPid]}, | ||
{"/getStats",[],guiHandler, [getStats, MainGenServerPid]}, | ||
|
||
{"/toolConnectionReq" , [] , utilities_handler , [MainGenServerPid]} , %% Added with NerlMonitor Project | ||
{"/worker_kill" , [] , utilities_handler , [worker_kill , MainGenServerPid]}, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. add a comment of monitor actions before your additions. |
||
{"/worker_down",actionHandler, [worker_down,MainGenServerPid]}, | ||
{"/[...]", [],noMatchingRouteHandler, [MainGenServerPid]} | ||
]} | ||
]), | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From some reason you change the README.md of the root.
I guess it was a mistake.
We should perform rebase on master together