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 240cc76 commit 70c728b
Showing 1 changed file with 0 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,17 +152,13 @@ post_train({GenWorkerEts, WeightsTensor}) ->
{CurrentModelWeights, BinaryType} = nerlNIF:call_to_get_weights(ModelID),
FedServerName = ets:lookup_element(FedServerEts, my_name, ?ETS_KEYVAL_VAL_IDX),
AllWorkersWeightsList = TotalWorkersWeights ++ [CurrentModelWeights],
io:format("GOT HERE1~n"),
AvgWeightsNerlTensor = generate_avg_weights(AllWorkersWeightsList, BinaryType),
io:format("GOT HERE2~n"),
nerlNIF:call_to_set_weights(ModelID, AvgWeightsNerlTensor), %% update self weights to new model
io:format("GOT HERE3~n"),
Func = fun(FedClient) ->
FedServerName = ets:lookup_element(ThisEts, my_name, ?ETS_KEYVAL_VAL_IDX),
W2WPid = ets:lookup_element(ThisEts, w2wcom_pid, ?ETS_KEYVAL_VAL_IDX),
w2wCom:send_message_with_event(W2WPid, FedServerName, FedClient, post_train_update, {SyncIdx, AvgWeightsNerlTensor})
end,
io:format("GOT HERE4~n"),
WorkersSourcesList = ets:lookup_element(GenWorkerEts, active_streams, ?ETS_KEYVAL_VAL_IDX),
WorkersList = [FedWorker || {_MyName, {FedWorker, _Source}} <- WorkersSourcesList],
% io:format("Sending new weights to workers ~p~n",[WorkersList]),
Expand Down

0 comments on commit 70c728b

Please sign in to comment.