Table Of Contents
Table Of Contents


class mxnet.kvstore.KVStore(handle)[source]

A key-value store for synchronization of values, over multiple devices.

Init, push and pull

KVStore.init(key, value) Initializes a single or a sequence of key-value pairs into the store.
KVStore.pull(key[, out, priority, ignore_sparse]) Pulls a single value or a sequence of values from the store.
KVStore.push(key, value[, priority]) Pushes a single or a sequence of key-value pairs into the store.
KVStore.row_sparse_pull(key[, out, …]) Pulls a single RowSparseNDArray value or a sequence of RowSparseNDArray values from the store with specified row_ids.


KVStore.load_optimizer_states(fname) Loads the optimizer (updater) state from the file.
KVStore.save_optimizer_states(fname[, …]) Saves the optimizer (updater) state to a file.
KVStore.set_gradient_compression(…) Specifies type of low-bit quantization for gradient compression and additional arguments depending on the type of compression being used.
KVStore.set_optimizer(optimizer) Registers an optimizer with the kvstore.


KVStore.num_workers Returns the number of worker nodes.
KVStore.rank Returns the rank of this worker node.
KVStore.type Returns the type of this kvstore.