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 18b76f5 commit e794774
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/Bridge/onnWorkers/workerGeneric.erl
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@ update_client_avilable_worker(MyName) ->
stream_handler(StreamPhase , ModelPhase , StreamName , DistributedBehaviorFunc) ->
GenWorkerEts = get(generic_worker_ets),
MyName = ets:lookup_element(GenWorkerEts, worker_name, ?ETS_KEYVAL_VAL_IDX),
io:format("~p got ~p from ~p~n",[MyName, StreamPhase, StreamName]),
% io:format("~p got ~p from ~p~n",[MyName, StreamPhase, StreamName]),
ClientPid = ets:lookup_element(GenWorkerEts, client_pid, ?ETS_KEYVAL_VAL_IDX),
ActiveStreams = ets:lookup_element(GenWorkerEts, active_streams, ?ETS_KEYVAL_VAL_IDX),
Expand Down
3 changes: 2 additions & 1 deletion src_erl/NerlnetApp/src/Client/clientStatem.erl
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,9 @@ training(cast, In = {stream_ended , Pair}, State = #client_statem_state{etsRef =
ListOfActiveWorkersSources = ets:lookup_element(EtsRef, active_workers_streams, ?DATA_IDX),
UpdatedListOfActiveWorkersSources = ListOfActiveWorkersSources -- [Pair],
ets:update_element(EtsRef, active_workers_streams, {?DATA_IDX, UpdatedListOfActiveWorkersSources}),
io:format("@Client: ~p~n",[UpdatedListOfActiveWorkersSources]),
case length(UpdatedListOfActiveWorkersSources) of
0 -> ets:update_element(EtsRef, all_workers_done, {?DATA_IDX, true});
0 -> io:format("GOT HERE~n"), ets:update_element(EtsRef, all_workers_done, {?DATA_IDX, true});
_ -> ok
end,
{next_state, training, State#client_statem_state{etsRef = EtsRef}};
Expand Down

0 comments on commit e794774

Please sign in to comment.