Skip to content

Commit 92cc6ea

Browse files
committed
chore: remove unused code
1 parent 4ad7cba commit 92cc6ea

File tree

1 file changed

+0
-26
lines changed

1 file changed

+0
-26
lines changed

examples/distributed/few-shot/maml_omniglot.py

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -160,32 +160,6 @@ def main():
160160
plot(log)
161161

162162

163-
def partitioner(net_rref, x_spt, y_spt, x_qry, y_qry, n_inner_iter, task_num):
164-
world_size = todist.get_world_size()
165-
offset = 1 if task_num < world_size else 0
166-
167-
partitions = []
168-
for task_id in range(task_num):
169-
rank = task_id % world_size + offset
170-
partitions.append(
171-
(
172-
rank,
173-
(
174-
net_rref,
175-
x_spt[task_id],
176-
y_spt[task_id],
177-
x_qry[task_id],
178-
y_qry[task_id],
179-
n_inner_iter,
180-
task_id,
181-
),
182-
None,
183-
)
184-
)
185-
186-
return partitions
187-
188-
189163
def transpose_mean_reducer(results):
190164
qry_losses, qry_accs = tuple(zip(*results))
191165
qry_loss = torch.mean(torch.stack(qry_losses))

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy