dgl.contrib.graph_store.SharedMemoryDGLGraph.worker_id

SharedMemoryDGLGraph.worker_id

The id of the current worker using the graph store.

When a worker connects to a graph store, it is assigned with a worker id. This is useful for the graph store server to identify who is sending requests.

The worker id is a unique number between 0 and num_workers. This is also useful for user’s code. For example, user’s code can use this number to decide how to assign GPUs to workers in multi-processing training.