lixin4ever/BERT-E2E-ABSA

What does local rank mean in code

Humanpaladin opened this issue · 2 comments

I don't quite understand what "local_rank" means in the code, could you explain it please? Thank you.

Thanks for your attention.

The argument "local_rank" is used to support DistributedDataParallel (DDP).

Concretely, the "local_rank" stores some local & unique information for the process, e.g., the id of the current gpu, and it can be regarded as the local identifier of each process.

Our project is built on top of DataParallel (DP) rather than DDP, thus, you can simply leave this argument alone or adopt the default setting of this argument (i.e., set "local_rank" as -1).

Thank you very much for your reply.
Maybe I should learn something about the DDP later.