I'm using tqdm with multiprocessing (using torchrun for DDP). Each process has a…
- User
I'm using tqdm with multiprocessing (using torchrun for DDP). Each process has a separate tqdm progress bar with
position=rank. This generally works, but for some reason it glitches and may put many extra progress bars below the main ones. For example, with 8 processes I get this:codeBatched rollout (16x): 42%|██████████████████████████████████████████▉ | 2153/5120 [00:53<01:23, 35.37tok/s]Batched rollout (16x): 29%|█████████████████████████████▊ | 1496/5120 [00:37<01:30, 40.13tok/s]Batched rollout (16x): 28%|████████████████████████████▎ | 1421/5120 [00:35<01:32, 39.97tok/s]Batched rollout (16x): 48%|████████████████████████████████████████████████▌ | 2439/5120 [01:02<01:23, 32.18tok/s]Batched rollout (16x): 40%|████████████████████████████████████████▌ | 2037/5120 [00:50<01:23, 37.14tok/s]Batched rollout (16x): 58%|██████████████████████████████████████████████████████████▋ | 2946/5120 [01:18<01:18, 27.85tok/s]Batched rollout (16x): 29%|██████████████████████████████ | 1507/5120 [00:37<01:30, 40.05tok/s]Batched rollout (16x): 45%|█████████████████████████████████████████████▊ | 2298/5120 [00:58<01:23, 33.96tok/s]Batched rollout (16x): 38%|███████████████████████████████████████▎ | 1971/5120 [00:48<01:22, 38.21tok/s]Batched rollout (16x): 28%|████████████████████████████▍ | 1429/5120 [00:35<01:32, 39.96tok/s]Batched rollout (16x): 27%|███████████████████████████▉ | 1401/5120 [00:34<01:32, 40.06tok/s]Batched rollout (16x): 20%|████████████████████▏ | 1016/5120 [00:25<01:41, 40.28tok/s]Batched rollout (16x): 52%|█████████████████████████████████████████████████████ | 2661/5120 [01:08<01:21, 30.19tok/s]Batched rollout (16x): 75%|████████████████████████████████████████████████████████████████████████████▍ | 3837/5120 [01:54<00:57, 22.22tok/s]Batched rollout (16x): 79%|█████████████████████████████████████████████████████████████████████████████████ | 4069/5120 [02:06<00:50, 20.99tok/s] Batched rollout (16x): 37%|██████████████████████████████████████▏ | 1916/5120 [00:47<01:22, 39.02tok/s] Assistant
- User
I've decided to try using a mutex with
tqdm.set_lock. However, my processes are launched as a ddp job usingtorchrun. How can I create a shared mutex across these ddp workers? Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.