Skip to content

Commit 2eebdb5

Browse files
committed
Merge branch 'precommit/ruff-format' of https://github.com/PyTorchLightning/pytorch-lightning into precommit/ruff-format
2 parents e52ec9f + eb3b260 commit 2eebdb5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lightning/data/processing/data_processor.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ def _upload_fn(upload_queue: Queue, remove_queue: Queue, cache_dir: str, output_
250250

251251
def _map_items_to_workers_sequentially(num_workers: int, user_items: List[Any]) -> List[List[Any]]:
252252
num_nodes = _get_num_nodes()
253-
world_size = (num_nodes * num_workers)
253+
world_size = num_nodes * num_workers
254254
num_items_per_worker = len(user_items) // world_size
255255

256256
num_items_per_worker: List[int] = [num_items_per_worker for _ in range(world_size)]
@@ -273,7 +273,7 @@ def _map_items_to_workers_sequentially(num_workers: int, user_items: List[Any])
273273
if worker_idx_start <= worker_idx and worker_idx < worker_idx_end:
274274
start = num_items_cumsum_per_worker[worker_idx]
275275
end = num_items_cumsum_per_worker[worker_idx + 1]
276-
out.append(user_items[start : end])
276+
out.append(user_items[start:end])
277277

278278
if len(out) != num_workers:
279279
raise RuntimeError("The items didn't haven't been assigned properly. Please, open an issue on Github.")

0 commit comments

Comments
 (0)