triton

package
v0.7.3-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 7, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeserializeBytesTensor

func DeserializeBytesTensor(encodedTensor []byte, capacity int64) []string

func DeserializeFloat32Tensor

func DeserializeFloat32Tensor(encodedTensor []byte) []float32

func DeserializeInt32Tensor

func DeserializeInt32Tensor(encodedTensor []byte) []int32

func ParseModel

func ParseModel(modelMetadata *inferenceserver.ModelMetadataResponse, modelConfig *inferenceserver.ModelConfigResponse) (int64, int64, int64)

func ReadFloat32

func ReadFloat32(fourBytes []byte) float32

func ReadInt32

func ReadInt32(fourBytes []byte) int32

func Reshape1DArrayFloat32To2D

func Reshape1DArrayFloat32To2D(array []float32, shape []int64) ([][]float32, error)

func Reshape1DArrayFloat32To3D

func Reshape1DArrayFloat32To3D(array []float32, shape []int64) ([][][]float32, error)

func Reshape1DArrayFloat32To4D

func Reshape1DArrayFloat32To4D(array []float32, shape []int64) ([][][][]float32, error)

func Reshape1DArrayInt32To2D

func Reshape1DArrayInt32To2D(array []int32, shape []int64) ([][]int32, error)

func Reshape1DArrayStringTo2D

func Reshape1DArrayStringTo2D(array []string, shape []int64) ([][]string, error)

TODO: generalise reshape functions by using interface{} arguments and returned values

func SerializeBytesTensor

func SerializeBytesTensor(tensor [][]byte) []byte

Types

type BatchUnspecifiedTaskOutputs

type BatchUnspecifiedTaskOutputs struct {
	Name              string
	Shape             []int64
	DataType          string
	SerializedOutputs []interface{} // batching output
}

type DetectionOutput

type DetectionOutput struct {
	Boxes  [][][]float32
	Labels [][]string
}

type KeypointOutput

type KeypointOutput struct {
	Keypoints [][][][]float32
	Boxes     [][][]float32
	Scores    [][]float32
}

type OcrOutput

type OcrOutput struct {
	Boxes [][][]float32
	Texts [][]string
}

type SingleOutputUnspecifiedTaskOutput

type SingleOutputUnspecifiedTaskOutput struct {
	Name     string
	Shape    []int64
	DataType string
	Data     interface{} // batching output
}

type Triton

type Triton interface {
	ServerLiveRequest() *inferenceserver.ServerLiveResponse
	ServerReadyRequest() *inferenceserver.ServerReadyResponse
	ModelMetadataRequest(modelName string, modelInstance string) *inferenceserver.ModelMetadataResponse
	ModelConfigRequest(modelName string, modelInstance string) *inferenceserver.ModelConfigResponse
	ModelInferRequest(task modelPB.ModelInstance_Task, rawInput [][]byte, modelName string, modelInstance string, modelMetadata *inferenceserver.ModelMetadataResponse, modelConfig *inferenceserver.ModelConfigResponse) (*inferenceserver.ModelInferResponse, error)
	PostProcess(inferResponse *inferenceserver.ModelInferResponse, modelMetadata *inferenceserver.ModelMetadataResponse, task modelPB.ModelInstance_Task) (interface{}, error)
	LoadModelRequest(modelName string) (*inferenceserver.RepositoryModelLoadResponse, error)
	UnloadModelRequest(modelName string) (*inferenceserver.RepositoryModelUnloadResponse, error)
	ListModelsRequest() *inferenceserver.RepositoryIndexResponse
	IsTritonServerReady() bool
	Init()
	Close()
}

func NewTriton

func NewTriton() Triton

type UnspecifiedTaskOutput

type UnspecifiedTaskOutput struct {
	RawOutput []SingleOutputUnspecifiedTaskOutput
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL