Skip to content

Commit

Permalink
[TORCH] FED DEBUG
Browse files Browse the repository at this point in the history
  • Loading branch information
GuyPerets106 committed Aug 2, 2024
1 parent e794774 commit 5918950
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src_erl/NerlnetApp/src/Client/clientStatem.erl
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ training(cast, In = {start_stream , Data}, State = #client_statem_state{etsRef =

training(cast, In = {end_stream , Data}, State = #client_statem_state{etsRef = EtsRef}) ->
{SourceName, _ClientName, WorkerName} = binary_to_term(Data),
io:format("@Client: Got end_stream from ~p to worker ~p~n",[SourceName, WorkerName]),
ClientStatsEts = get(client_stats_ets),
stats:increment_messages_received(ClientStatsEts),
stats:increment_bytes_received(ClientStatsEts , nerl_tools:calculate_size(In)),
Expand Down
3 changes: 2 additions & 1 deletion src_erl/NerlnetApp/src/Source/sourceStatem.erl
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,8 @@ transmitter(TimeInterval_ms, SourceEtsRef, SourcePid, Epochs ,ClientWorkerPairs,
% Message to workers : "end_stream"
FuncEnd = fun({ClientName, WorkerNameStr}) ->
ToSend = {MyName, ClientName, list_to_atom(WorkerNameStr)},
nerl_tools:http_router_request(RouterHost, RouterPort, [ClientName], atom_to_list(end_stream), ToSend)
nerl_tools:http_router_request(RouterHost, RouterPort, [ClientName], atom_to_list(end_stream), ToSend),
io:format("Source ~p sent end_stream to ~p of client ~p~n",[MyName, WorkerNameStr, ClientName])
end,
lists:foreach(FuncEnd, ClientWorkerPairs),
ErrorBatches = ets:lookup_element(TransmitterEts, batches_issue, ?DATA_IDX),
Expand Down

0 comments on commit 5918950

Please sign in to comment.