Skip to content

Commit

Permalink
TODO - Guy fix random
Browse files Browse the repository at this point in the history
  • Loading branch information
leondavi committed Jul 20, 2024
1 parent 1dd4250 commit c2c2f0f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src_erl/NerlnetApp/src/Source/sourceSendingPolicies.erl
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ send_method_random(TransmitterEts, Epochs, TimeInterval_ms, ClientWorkerPairs, B
TotalNumOfBatches = length(BatchesListToSend),
BatchesIndexes = generate_batch_indexes(TotalNumOfBatches, EpochIdx),
ClientWorkerPairsLength = length(ClientWorkerPairs),
WorkerIdxBatchIdxTuples = [ {X div ClientWorkerPairsLength, rand:uniform(ClientWorkerPairsLength)} || X <- BatchesIndexes],
% TODO Guy - there is an issue here the batch Index should be accumulated according to random selections.
WorkerIdxBatchIdxTuples = [ {X, rand:uniform(ClientWorkerPairsLength)} || X <- BatchesIndexes],
BatchesWithIndexes = lists:zip(WorkerIdxBatchIdxTuples, BatchesListToSend), % Tuple {{BatchIdx, WorkerIdx}, Batch}
lists:foreach(BatchFunc, BatchesWithIndexes),
% update batches sent
Expand Down

0 comments on commit c2c2f0f

Please sign in to comment.