shared

package
v0.19.1 Latest Latest
Warning

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

Go to latest
Published: May 16, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

package shared contains client and shared dependency without direct dependency on tensorflow

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Field

type Field struct {
	Name string

	// Position in cache key.
	Index int

	// The type of the field.
	// Supports "float" which maps to float32.
	// Otherwise, refer to reflect.Type.Name().
	DataType string `json:",omitempty" yaml:",omitempty"`

	// Indicates not an input for the model, but is eligible to be passed in a payload.
	Auxiliary bool `json:",omitempty" yaml:",omitempty"`

	// Indicates, on its own, that it is an input for the model, and that it should be directly input as a cache key.
	// Applies to string inputs.
	Wildcard bool `json:",omitempty" yaml:",omitempty"`

	// Indicates, on its own, that it is an input for the model,
	// and that it should be directly input as a cache key.
	Precision int `json:",omitempty" yaml:",omitempty"`
	// contains filtered or unexported fields
}

func (*Field) DataTypeToRawType added in v0.19.0

func (f *Field) DataTypeToRawType()

func (*Field) RawType

func (f *Field) RawType() reflect.Type

func (*Field) SetRawType

func (f *Field) SetRawType(t reflect.Type)

SetRawType is used when pulling from the model.

type Fields

type Fields []*Field

func (Fields) Len added in v0.6.0

func (f Fields) Len() int

implements sort.Interface.Len

func (Fields) Less added in v0.6.0

func (f Fields) Less(i, j int) bool

implements sort.Interface.Less

func (Fields) Swap added in v0.6.0

func (f Fields) Swap(i, j int)

implements sort.Interface.Swap

type MetaInput

type MetaInput struct {
	Inputs []*Field

	// This is used to order inputs and provide extra caching information to the client.
	// All inputs from the model will automatically be added here.
	KeyFields []string `json:",omitempty" yaml:",omitempty"`

	// Deprecated: use Field.Auxiliary
	// Any field specified in here will be added as a Field with auxiliary:true, datatype:string.
	// If the field exists by name, it will cause a panic.
	Auxiliary []string `json:",omitempty" yaml:",omitempty"`

	Outputs []*Field `json:",omitempty" yaml:",omitempty"`
}

func (*MetaInput) FieldByName

func (m *MetaInput) FieldByName() map[string]*Field

func (*MetaInput) Init

func (m *MetaInput) Init()

Init operates slightly differently on the server versus the client. On the server, it is called after reading the configuration file. On the client, it is called after fetching the configuration from the server, which will have already processed it via reconcileIOFromSignature().

func (*MetaInput) KeysLen

func (d *MetaInput) KeysLen() int

func (*MetaInput) OutputByName added in v0.19.0

func (m *MetaInput) OutputByName() map[string]*Field

func (*MetaInput) OutputIndex added in v0.2.0

func (m *MetaInput) OutputIndex() map[string]int

TODO Deprecate

type Output

type Output struct {
	Values     []interface{}
	InputIndex int
}

Directories

Path Synopsis
hk
heavykeeper implementation
heavykeeper implementation
mg
Misra-Gries '84 "heavy hitters" for frequent elements.
Misra-Gries '84 "heavy hitters" for frequent elements.

Jump to

Keyboard shortcuts

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