(barrier kvstore)
Global barrier among all worker nodes For example, assume there are n machines, we want to let machine 0 first init the values, and then pull the inited value to all machines. Before pulling, we can place a barrier to guarantee that the initialization is finished.
Global barrier among all worker nodes For example, assume there are n machines, we want to let machine 0 first init the values, and then pull the inited value to all machines. Before pulling, we can place a barrier to guarantee that the initialization is finished.
(create)
(create name)
Create a new KVStore WARNING: it is your responsibility to clear this object through dispose.
Create a new KVStore WARNING: it is your responsibility to clear this object through dispose. - name : #{local, dist} (default is local) The type of KVStore - local works for multiple devices on a single machine (single process) - dist works for multi-machines (multiple processes)
(dispose kvstore)
Release the native memory. The object shall never be used after it is disposed.
Release the native memory. The object shall never be used after it is disposed.
(init kvstore ks vs)
Initialize a single or a sequence of key-value pairs into the store. For each key, one must init it before push and pull. Only worker 0's (rank == 0) data are used. This function returns after data have been initialized successfully kvstore - KVstore ks - keys (vec or strings or single string) vs - values (vec or NDArrays or single ndarry)
Initialize a single or a sequence of key-value pairs into the store. For each key, one must init it before push and pull. Only worker 0's (rank == 0) data are used. This function returns after data have been initialized successfully kvstore - KVstore ks - keys (vec or strings or single string) vs - values (vec or NDArrays or single ndarry)
(load-optimizer-states kvstore fname)
Load optimizer (updater) state from file
Load optimizer (updater) state from file - kvstore -fname Path to input states file.
(num-dead-node kvstore node-id)
(num-workers kvstore)
Get the number of worker nodes
Get the number of worker nodes
(pull kvstore ks outs)
(pull kvstore ks outs priority)
Pull a single value or a sequence of values from the store. Data consistency:
Pull a single value or a sequence of values from the store. Data consistency: 1. this function returns after adding an operator to the engine. But any further read on out will be blocked until it is finished. 2. pull is always called after all previous push and pull on the same key are finished 3. It pulls the newest value from the store. - kvstore - ks single or vector of (strings) - outs single or vector of outs (NDArrays) - priority The priority of the push operation. The higher the priority, the faster this action is likely to be executed before other push actions.
(push kvstore ks vs)
(push kvstore ks vs priority)
Push a single or a sequence of key-value pairs into the store. Data consistency:
-ks Keys -vs values According values
Push a single or a sequence of key-value pairs into the store. Data consistency: 1. this function returns after adding an operator to the engine. 2. push is always called after all previous push and pull on the same key are finished 3. there is no synchronization between workers. One can use _barrier() to sync all workers -ks Keys -vs values According values - priority The priority of the push operation. The higher the priority, the faster this action is likely to be executed before other push actions.
(rank kvstore)
Get the rank of this worker node returns The rank of this node, which is in [0, get_num_workers())
Get the rank of this worker node returns The rank of this node, which is in [0, get_num_workers())
(save-optimizer-states kvstore fname)
Save optimizer (updater) state to file
Save optimizer (updater) state to file - kvstore - fname Path to output states file.
(send-command-to-servers kvstore head body)
Send a command to all server nodes Send a command to all server nodes, which will make each server node run KVStoreServer.controller This function returns after the command has been executed in all server nodes -kvstore -head the head of the command
Send a command to all server nodes Send a command to all server nodes, which will make each server node run KVStoreServer.controller This function returns after the command has been executed in all server nodes -kvstore -head the head of the command - body the body of the command
(set-barrier-before-exit kvstore barrier-before-exit)
Whether to do barrier when the kvstore finalizes
Whether to do barrier when the kvstore finalizes - kvstore - barrier-before-exit boolean
(set-optimizer kvstore optimizer)
Register an optimizer to the store If there are multiple machines, this process (should be a worker node) will pack this optimizer and send it to all servers. It returns after this action is done
Register an optimizer to the store If there are multiple machines, this process (should be a worker node) will pack this optimizer and send it to all servers. It returns after this action is done
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close