public class SbeStatsInitializationReport extends java.lang.Object implements StatsInitializationReport, AgronaPersistable
StatsInitializationReport
using Simple Binary Encoding (SBE)Constructor and Description |
---|
SbeStatsInitializationReport() |
Modifier and Type | Method and Description |
---|---|
void |
decode(byte[] decode)
Decode the content of the given
byte array in to this persistable
|
void |
decode(java.nio.ByteBuffer buffer)
Decode from the given
ByteBuffer |
void |
decode(org.agrona.DirectBuffer buffer) |
void |
decode(java.io.InputStream inputStream)
Decode from the given input stream
|
byte[] |
encode() |
void |
encode(java.nio.ByteBuffer buffer)
Encode this persistable in to a
ByteBuffer |
void |
encode(org.agrona.MutableDirectBuffer buffer) |
void |
encode(java.io.OutputStream outputStream)
Encode this persistable in to an output stream
|
int |
encodingLengthBytes()
Length of the encoding, in bytes, when using
Persistable.encode()
Length may be different using Persistable.encode(OutputStream) , due to things like stream headers |
java.lang.String |
getSessionID()
Get the session id
|
long |
getTimeStamp()
Get when this was created.
|
java.lang.String |
getTypeID()
Get the type id
|
java.lang.String |
getWorkerID()
Get the worker id
|
boolean |
hasHardwareInfo() |
boolean |
hasModelInfo() |
boolean |
hasSoftwareInfo() |
void |
reportHardwareInfo(int jvmAvailableProcessors,
int numDevices,
long jvmMaxMemory,
long offHeapMaxMemory,
long[] deviceTotalMemory,
java.lang.String[] deviceDescription,
java.lang.String hardwareUID) |
void |
reportIDs(java.lang.String sessionID,
java.lang.String typeID,
java.lang.String workerID,
long timeStamp) |
void |
reportModelInfo(java.lang.String modelClassName,
java.lang.String modelConfigJson,
java.lang.String[] modelParamNames,
int numLayers,
long numParams)
Report the model information
|
void |
reportSoftwareInfo(java.lang.String arch,
java.lang.String osName,
java.lang.String jvmName,
java.lang.String jvmVersion,
java.lang.String jvmSpecVersion,
java.lang.String nd4jBackendClass,
java.lang.String nd4jDataTypeName,
java.lang.String hostname,
java.lang.String jvmUid,
java.util.Map<java.lang.String,java.lang.String> swEnvironmentInfo) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getHwDeviceDescription, getHwDeviceTotalMemory, getHwHardwareUID, getHwJvmAvailableProcessors, getHwJvmMaxMemory, getHwNumDevices, getHwOffHeapMaxMemory, getModelClassName, getModelConfigJson, getModelNumLayers, getModelNumParams, getModelParamNames, getSwArch, getSwEnvironmentInfo, getSwHostName, getSwJvmName, getSwJvmSpecVersion, getSwJvmUID, getSwJvmVersion, getSwNd4jBackendClass, getSwNd4jDataTypeName, getSwOsName
public void reportIDs(java.lang.String sessionID, java.lang.String typeID, java.lang.String workerID, long timeStamp)
reportIDs
in interface StatsInitializationReport
public void reportSoftwareInfo(java.lang.String arch, java.lang.String osName, java.lang.String jvmName, java.lang.String jvmVersion, java.lang.String jvmSpecVersion, java.lang.String nd4jBackendClass, java.lang.String nd4jDataTypeName, java.lang.String hostname, java.lang.String jvmUid, java.util.Map<java.lang.String,java.lang.String> swEnvironmentInfo)
reportSoftwareInfo
in interface StatsInitializationReport
arch
- Operating system architecture, as reported by JVMosName
- Operating system namejvmName
- JVM namejvmVersion
- JVM versionjvmSpecVersion
- JVM Specification version (for example, 1.8)nd4jBackendClass
- ND4J backend Factory classnd4jDataTypeName
- ND4J datatype namehostname
- Hostname for the machine, if availablejvmUid
- A unique identified for the current JVM. Should be shared by all instances in the same JVM.
Should vary for different JVMs on the same machine.swEnvironmentInfo
- Environment information: Usually from Nd4j.getExecutioner().getEnvironmentInformation()public void reportHardwareInfo(int jvmAvailableProcessors, int numDevices, long jvmMaxMemory, long offHeapMaxMemory, long[] deviceTotalMemory, java.lang.String[] deviceDescription, java.lang.String hardwareUID)
reportHardwareInfo
in interface StatsInitializationReport
jvmAvailableProcessors
- Number of available processor cores according to the JVMnumDevices
- Number of compute devices (GPUs)jvmMaxMemory
- Maximum memory for the JVMoffHeapMaxMemory
- Maximum off-heap memorydeviceTotalMemory
- GPU memory by device: same length as numDevices. May be null, if numDevices is 0deviceDescription
- Description of each device. May be null, if numDevices is 0hardwareUID
- A unique identifier for the machine. Should be shared by all instances running on
the same machine, including in different JVMspublic void reportModelInfo(java.lang.String modelClassName, java.lang.String modelConfigJson, java.lang.String[] modelParamNames, int numLayers, long numParams)
StatsInitializationReport
reportModelInfo
in interface StatsInitializationReport
modelClassName
- Model class name: i.e., type of modelmodelConfigJson
- Model configuration, as JSON stringnumLayers
- Number of layers in the modelnumParams
- Number of parameters in the modelpublic boolean hasSoftwareInfo()
hasSoftwareInfo
in interface StatsInitializationReport
public boolean hasHardwareInfo()
hasHardwareInfo
in interface StatsInitializationReport
public boolean hasModelInfo()
hasModelInfo
in interface StatsInitializationReport
public java.lang.String getSessionID()
Persistable
getSessionID
in interface Persistable
public java.lang.String getTypeID()
Persistable
getTypeID
in interface Persistable
public java.lang.String getWorkerID()
Persistable
getWorkerID
in interface Persistable
public long getTimeStamp()
Persistable
getTimeStamp
in interface Persistable
public int encodingLengthBytes()
Persistable
Persistable.encode()
Length may be different using Persistable.encode(OutputStream)
, due to things like stream headersencodingLengthBytes
in interface Persistable
public byte[] encode()
encode
in interface Persistable
public void encode(java.nio.ByteBuffer buffer)
Persistable
ByteBuffer
encode
in interface Persistable
public void encode(org.agrona.MutableDirectBuffer buffer)
encode
in interface AgronaPersistable
public void encode(java.io.OutputStream outputStream) throws java.io.IOException
Persistable
encode
in interface Persistable
java.io.IOException
public void decode(byte[] decode)
Persistable
decode
in interface Persistable
public void decode(java.nio.ByteBuffer buffer)
Persistable
ByteBuffer
decode
in interface Persistable
public void decode(org.agrona.DirectBuffer buffer)
decode
in interface AgronaPersistable
public void decode(java.io.InputStream inputStream) throws java.io.IOException
Persistable
decode
in interface Persistable
java.io.IOException