world#

The World class is used for easily querying distributed training info, used by StreamingDataset.

Functions

get_world

Returns a World object, initialized using composer.utils.dist and torch.utils.data.get_worker_info()

Classes

World

A NamedTuple that provides context about workers, devices, and nodes.

class composer.datasets.streaming.world.World(global_node, global_num_nodes, global_device, global_num_devices, node_device, node_num_devices, global_worker, global_num_workers, node_worker, node_num_workers, device_worker, device_num_workers)[source]#

Bases: tuple

A NamedTuple that provides context about workers, devices, and nodes.

global_node#

The id of this node within the global system

Type

int

global_num_nodes#

The number of nodes within the global system

Type

int

global_device#

The id of this device within the global system

Type

int

global_num_devices#

The number of devices within the global system

Type

int

node_device#

The id of this device within this node

Type

int

node_num_devices#

The number of devices within this node

Type

int

global_worker#

The id of this worker within the global system

Type

int

global_num_workers#

The number of workers within the global system

Type

int

node_worker#

The id of this worker within this node

Type

int

node_num_workers#

The number of workers within this node

Type

int

device_worker#

The id of this worker within this device

Type

int

device_num_workers#

The number of workers within this device

Type

int

composer.datasets.streaming.world.get_world()[source]#

Returns a World object, initialized using composer.utils.dist and torch.utils.data.get_worker_info()