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) //
- Alphabetic
- By Inheritance
- InferenceClient
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
lazy val
channel: ManagedChannel
gRPC channel
-
def
channelReady(requestConnection: Boolean = true): Boolean
check if channel is ready
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
- var config: Map[String, String]
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
lazy val
grpc_stub: GRPCInferenceServiceBlockingStub
gRPC stub
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
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
-
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
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
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]
-
lazy val
log: Logger
init logger
init logger
- Annotations
- @transient()
- def main(args: Array[String]): Unit
-
def
modelConfig(model: String, version: String = ""): Any
Get Model Config
-
def
modelMetadata(model: String, version: String = ""): Any
Get model metadata ( name, version, platform, inputs, outputs)
-
def
modelReady(model: String, version: String = ""): Boolean
Check readiness of a model in the inference server
-
def
models(): List[ModelIndex]
get list of models deployed in the model repository
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
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
-
def
serverLive(): Boolean
Check liveness of the inference server
-
def
serverMetadata(): Any
Get server metadata (name, version, metadata)
-
def
serverReady(): Boolean
Check readiness of the inference server
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toArray(b: IntBuffer): Array[Int]
converts IntBuffer to Array[Int]
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated
- Deprecated