stream

package
v0.13.4 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KVFloat64s added in v0.12.10

type KVFloat64s []float64

func (KVFloat64s) Encode added in v0.12.10

func (s KVFloat64s) Encode(m io.Stream)

implements github.com/viant/tapper/io.Encoder

type KVInts added in v0.12.10

type KVInts []int

func (KVInts) Encode added in v0.12.10

func (s KVInts) Encode(m io.Stream)

implements github.com/viant/tapper/io.Encoder

type KVStrings added in v0.12.10

type KVStrings []string

func (KVStrings) Encode added in v0.12.10

func (s KVStrings) Encode(m io.Stream)

implements github.com/viant/tapper/io.Encoder

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service is used to log request inputs to model outputs without an output transformer, in JSON format.

The input values will be directly inlined into the resulting JSON. The outputs will be provided as properties in the resulting JSON, with the keys as the output Tensor names.

If the dimensions of the output from the model are [1, numOutputs, 1] (single request), the value in the JSON object will be a scalar. If the dimensions of the output from the model are [batchSize, numOutputs, 1], (batch request), the value in the JSON object will be a list of scalars of length batchSize. If the dimensions of the output from the model are [1, numOutputs, outDims], (single request), the value of the JSON object will be a list of scalars of length outDims. If the dimensions of the output from the model are [batchSize, numOutputs, outDims], (batch request), the value of the JSON object will be a list of objects of length batchSize, where each object has a property with key "output" and value a list of scalars of length outDims.

func NewService

func NewService(modelID string, streamCfg *config.Stream, afsv afs.Service, dp dictProvider, op outputsProvider, m *gmetric.Service) (*Service, error)

func (*Service) Log

func (s *Service) Log(data []byte, output interface{}, timeTaken time.Duration)

Jump to

Keyboard shortcuts

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