Class/Object

org.apache.mxnet

KVStore

Related Docs: object KVStore | package mxnet

Permalink

class KVStore extends NativeResource

Linear Supertypes
NativeResource, WarnIfNotDisposed, AutoCloseable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. KVStore
  2. NativeResource
  3. WarnIfNotDisposed
  4. AutoCloseable
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new KVStore(handle: KVStoreHandle)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def barrier(): Unit

    Permalink

    Global barrier among all worker nodes

    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.

  6. val bytesAllocated: Long

    Permalink

    Off-Heap Bytes Allocated for this object

    Off-Heap Bytes Allocated for this object

    Definition Classes
    KVStore → NativeResource
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def close(): Unit

    Permalink
    Definition Classes
    NativeResource → AutoCloseable
  9. val creationTrace: Option[Array[StackTraceElement]]

    Permalink
    Attributes
    protected
    Definition Classes
    WarnIfNotDisposed
  10. def dispose(): Unit

    Permalink
    Definition Classes
    NativeResource
  11. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  13. def finalize(): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    WarnIfNotDisposed → AnyRef
  14. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  15. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  16. def init(key: String, value: NDArray): Unit

    Permalink
  17. def init(keys: Array[String], values: Array[NDArray]): Unit

    Permalink

    Initialize a single or a sequence of key-value pairs into the store.

    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

    keys

    The keys.

    values

    The values.

  18. def isDisposed: Boolean

    Permalink
    Definition Classes
    NativeResource → WarnIfNotDisposed
  19. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  20. def loadOptimizerStates(fname: String): Unit

    Permalink

    Load optimizer (updater) state from file

    Load optimizer (updater) state from file

    fname

    Path to input states file.

  21. def logDisposeWarning(): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    WarnIfNotDisposed
  22. def nativeAddress: CPtrAddress

    Permalink

    native Address associated with this object

    native Address associated with this object

    Definition Classes
    KVStore → NativeResource
  23. def nativeDeAllocator: (CPtrAddress) ⇒ MXUint

    Permalink

    Function Pointer to the NativeDeAllocator of nativeAddress

    Function Pointer to the NativeDeAllocator of nativeAddress

    Definition Classes
    KVStore → NativeResource
  24. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  25. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  26. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  27. def numDeadNode(nodeId: Int): Int

    Permalink
  28. def numWorkers: Int

    Permalink

    Get the number of worker nodes

    Get the number of worker nodes

    returns

    The number of worker nodes

  29. def pull(key: String, outs: Array[NDArray]): Unit

    Permalink
  30. def pull(key: String, outs: Array[NDArray], priority: Int): Unit

    Permalink
  31. def pull(key: String, out: NDArray, priority: Int = 0): Unit

    Permalink
  32. def pull(keys: Array[String], outs: Array[NDArray]): Unit

    Permalink
  33. def pull(keys: Array[String], outs: Array[NDArray], priority: Int): Unit

    Permalink

    Pull a single value or a sequence of values from the store.

    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.

    keys

    Keys

    outs

    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.

  34. def push(key: String, values: Array[NDArray]): Unit

    Permalink
  35. def push(key: String, values: Array[NDArray], priority: Int): Unit

    Permalink
  36. def push(key: String, value: NDArray, priority: Int = 0): Unit

    Permalink
  37. def push(keys: Array[String], values: Array[NDArray]): Unit

    Permalink
  38. def push(keys: Array[String], values: Array[NDArray], priority: Int): Unit

    Permalink

    Push a single or a sequence of key-value pairs into the store.

    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

    keys

    Keys

    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.

  39. def rank: Int

    Permalink

    Get the rank of this worker node

    Get the rank of this worker node

    returns

    The rank of this node, which is in [0, get_num_workers())

  40. val ref: NativeResourceRef

    Permalink

    Call NativeResource.register to get the reference

    Call NativeResource.register to get the reference

    Definition Classes
    KVStore → NativeResource
  41. def register(): NativeResourceRef

    Permalink

    Register this object for PhantomReference tracking and in ResourceScope if used inside ResourceScope.

    Register this object for PhantomReference tracking and in ResourceScope if used inside ResourceScope.

    returns

    NativeResourceRef that tracks reachability of this object using PhantomReference

    Definition Classes
    NativeResource
  42. def saveOptimizerStates(fname: String): Unit

    Permalink

    Save optimizer (updater) state to file

    Save optimizer (updater) state to file

    fname

    Path to output states file.

  43. def setBarrierBeforeExit(barrierBeforeExit: Boolean): Unit

    Permalink

    Whether to do barrier when the kvstore finalizes

  44. def setOptimizer(optimizer: Optimizer): Unit

    Permalink

    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.

    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.

    optimizer

    the optimizer

  45. def setUpdater(updater: MXKVStoreUpdater): Unit

    Permalink

    Set a push updater into the store.

    Set a push updater into the store.

    This function only changes the local store. Use setOptimizer for multi-machines.

    updater

    the updater function

  46. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  47. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  48. def tracingEnabled: Boolean

    Permalink
    Attributes
    protected
    Definition Classes
    WarnIfNotDisposed
  49. def type: String

    Permalink
  50. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  51. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  52. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from NativeResource

Inherited from WarnIfNotDisposed

Inherited from AutoCloseable

Inherited from AnyRef

Inherited from Any

Ungrouped