Closed vamckrish32 closed 10 months ago
Hi @vamckrish32 , thanks for your attention to our work!
Could you please tell me which project raised the error, and how to reproduce it?
hi I am getting this error from Tiny Clip pre training code By running this command "sh script/auto_weight_inherit_100to75.sh"
Thank @vamckrish32 ! I will check it.
Sorry that I could not reproduce the error.
I need more details.
--prune-step
?Thank you!
Close it. Feel free to reopen it if the issue still exists. : )
@wkcn Sorry, I encountered the same problem.
@Gumpest Thanks for your attention to our work!
Which version of PyTorch did you use? You could try updating PyTorch to 1.11 or the higher version.
@wkcn Thanks for your reply. The version of PyTorch is 2.1.2.
The initial step.
3 A100 80GB and utilize auto_weight_inherit_100to75.sh.
By the way, if I change L476
to the torch.nn.parallel.DistributedDataParallel, device_ids=[device], find_unused_parameters=True, **ddp_args)
, it will Expected to mark a variable ready only once.
@Gumpest Thank you for pointing it out! I will check it on PyTorch 2.1.2. Before the bug fixed, you could try to use PyTorch 1.11.
@wkcn Thanks a lot! Wait for your solution. 🙏
@wkcn PyTorch 1.11 is well done!
Hi @Gumpest and @vamckrish32 , I have fixed the bug on PyTorch 2.0+ in the latest code of TinyCLIP.
RuntimeError: Expected to have finished reduction in the prior iteration before starting a new one. This error indicates that your module has parameters that were not used in producing loss. You can enable unused parameter detection by passing the keyword argument
find_unused_parameters=True
totorch.nn.parallel.DistributedDataParallel
, and by making sure allforward
function outputs participate in calculating loss. If you already have done the above, then the distributed data parallel module wasn't able to locate the output tensors in the return value of your module'sforward
function. Please include the loss function and the structure of the return value offorward
of your module when reporting this issue (e.g. list, dict, iterable). Parameter indices which did not receive grad for rank 0: 138 139 142 143 144 145 In addition, you can set the environment variable TORCH_DISTRIBUTED_DEBUG to either INFO or DETAIL to print out information about which particular parameters did not receive gradient on this rank as part of this error