Packages

  • package root
    Definition Classes
    root
  • package com
    Definition Classes
    root
  • package nvidia
    Definition Classes
    com
  • package mdx

    this is the base transform for mdx analytics SDK, the transform comprise of

    this is the base transform for mdx analytics SDK, the transform comprise of


    core : mdx streaming core classes
    xapp : comprise of sample applications

    Definition Classes
    nvidia
  • package core

    this is the core transform for mdx SDK, contains transform and classes for the core mdx functionality

    this is the core transform for mdx SDK, contains transform and classes for the core mdx functionality

    Definition Classes
    mdx
  • package triton
    Definition Classes
    core
  • InferenceClient
o

com.nvidia.mdx.core.triton

InferenceClient

object InferenceClient

Interface to access triton inference server, using a gRPC client, example usage below

InferenceClient.config = Util.readConfig("config.json")
val model = "a-sensor-id" // models have same name as sensorId


//check channel ready
InferenceClient.channelReady(false)

//server api
InferenceClient.serverLive()
InferenceClient.serverReady()
InferenceClient.serverMetadata()

//model api
InferenceClient.modelReady(model)
InferenceClient.modelMetadata(model)
InferenceClient.modelConfig(model)

//linear interpolate
val tensor = (1 to 40).map(x => Array(x.toDouble, 100 + x.toDouble)).toArray
val inter = InferenceClient.linearInterpolate(tensor, 100)

//inference
val jsonArray : Array[String]  = provide Behavior json array
InferenceClient.inferWithJson(model, jsonArray, config)

//
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. InferenceClient
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. lazy val channel: ManagedChannel

    gRPC channel

  6. def channelReady(requestConnection: Boolean = true): Boolean

    check if channel is ready

  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @HotSpotIntrinsicCandidate()
  8. var config: Map[String, String]
  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  11. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  12. lazy val grpc_stub: GRPCInferenceServiceBlockingStub

    gRPC stub

  13. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  14. def inferWithJson(sensorId: String, behavior: List[String], config: Map[String, String] = Map.empty): (Array[Int], String)

    takes array of Behavior JSON as inputs and returns the clusterIndex for each Behavior based on object movement coordinates.

    takes array of Behavior JSON as inputs and returns the clusterIndex for each Behavior based on object movement coordinates. Normalizes the length of locations array to shape [100,2] and translate the tensor to row major format before sending the inference request. Each sensor has a corresponding model which is created by the Model Learning pipeline. The model input/output shape is as below

     inputs {
    name: "input__0"
    datatype: "FP64"
    shape: -1
    shape: 100
    shape: 2
    }
    outputs {
    name: "output__0"
    datatype: "INT32"
    shape: -1
    shape: 1
    }

    The above model input and output is subject to change, as more analytics based on object pose, gesture and gaze will be added

  15. def inferWithProtobuf(sensorId: String, behavior: List[Behavior], config: Map[String, String] = Map.empty): (Array[Int], String)

    takes array of protobuf Behavior as inputs and returns the clusterIndex for each Behavior based on object movement coordinates.

    takes array of protobuf Behavior as inputs and returns the clusterIndex for each Behavior based on object movement coordinates. Normalizes the length of locations array to shape [100,2] and translate the tensor to row major format before sending the inference request. Each sensor has a corresponding model which is created by the Model Learning pipeline. The model input/output shape is as below

     inputs {
    name: "input__0"
    datatype: "FP64"
    shape: -1
    shape: 100
    shape: 2
    }
    outputs {
    name: "output__0"
    datatype: "INT32"
    shape: -1
    shape: 1
    }

    The above model input and output is subject to change, as more analytics based on object pose, gesture and gaze will be added

  16. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  17. def linearInterpolate(coordinates: Array[Array[Double]], target_length: Int = 100): Array[Array[Double]]

    generates a locations coordinate array with desired length, example it can take dimension of [40,2] and translated to [100,2], where target_length=100.

    generates a locations coordinate array with desired length, example it can take dimension of [40,2] and translated to [100,2], where target_length=100. Same while dealing with longer locations array say [120,2] will translated to [100,2]

  18. lazy val log: Logger

    init logger

    init logger

    Annotations
    @transient()
  19. def main(args: Array[String]): Unit
  20. def modelConfig(model: String, version: String = ""): Any

    Get Model Config

  21. def modelMetadata(model: String, version: String = ""): Any

    Get model metadata ( name, version, platform, inputs, outputs)

  22. def modelReady(model: String, version: String = ""): Boolean

    Check readiness of a model in the inference server

  23. def models(): List[ModelIndex]

    get list of models deployed in the model repository

  24. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  25. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  26. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  27. def rowMajor(tensor: Array[Array[Array[Double]]], tr_length: Int = 100): Array[Double]

    translate an input tensor to row major format, before sending the gRPC request

  28. def serverLive(): Boolean

    Check liveness of the inference server

  29. def serverMetadata(): Any

    Get server metadata (name, version, metadata)

  30. def serverReady(): Boolean

    Check readiness of the inference server

  31. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  32. def toArray(b: IntBuffer): Array[Int]

    converts IntBuffer to Array[Int]

  33. def toString(): String
    Definition Classes
    AnyRef → Any
  34. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  36. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] ) @Deprecated
    Deprecated

Inherited from AnyRef

Inherited from Any

Ungrouped