Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions plato/samplers/sample_quantity_noniid.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def __init__(self, datasource, client_id, testing):
min_partition_size=min_partition_size,
concentration=concentration,
num_clients=total_clients,
)[client_id]
)[client_id-1]

def sample_quantity_skew(
self,
Expand All @@ -87,7 +87,7 @@ def sample_quantity_skew(
total_size=dataset_size,
concentration=concentration,
min_partition_size=min_partition_size,
number_partitions=num_clients,
number_partitions=num_clients+1,
is_extend_total_size=True,
)

Expand All @@ -99,7 +99,7 @@ def sample_quantity_skew(
)

# obtain the assigned subdataset indices for current client
clients_assigned_idxs = np.split(extended_dataset_indices, proportions_range)
clients_assigned_idxs = np.split(extended_dataset_indices, proportions_range)[:-1]

return clients_assigned_idxs

Expand Down