Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
thejaminator committed Apr 27, 2023
1 parent 2cd4401 commit 72fc632
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion elk/utils/fsdp.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,8 @@ def imap(
closure_pkl = dill.dumps(closure)
result_queues = []
for q, result_queue in zip(self._task_queues, self._result_queues):
# Put the same dataset on each queue, so that each worker gets the same
# inputs
q.put((closure_pkl, dataset))
result_queues.append(result_queue)

Expand Down Expand Up @@ -213,7 +215,7 @@ def _worker(
logging.disable(logging.CRITICAL)
warnings.filterwarnings("ignore")

closure: Callable[[ModelOutput], Any] | None = None
closure: Callable[[ModelOutput], Any]
dataset: Dataset | None = None
device = devices[rank]

Expand Down

0 comments on commit 72fc632

Please sign in to comment.