Documentation
¶
Index ¶
- Constants
- Variables
- func Float32s(reply interface{}, err error) ([]float32, error)
- func Int16s(reply interface{}, err error) ([]int16, error)
- func Int8s(reply interface{}, err error) ([]int8, error)
- func ModelRunArgs(name string, inputs []string, outputs []string, includeCommandName bool) redis.Args
- func ProcessTensorReplyBlob(resp []interface{}, err error) ([]interface{}, error)
- func ProcessTensorReplyMeta(resp interface{}, err error) (data []interface{}, outErr error)
- func ProcessTensorReplyValues(resp []interface{}, err error) ([]interface{}, error)
- func TensorSetArgs(name string, dt DataType, dims []int, data interface{}, ...) (redis.Args, error)
- func Uint16s(reply interface{}, err error) ([]uint16, error)
- func Uint8s(reply interface{}, err error) ([]uint8, error)
- type BackendType
- type Client
- func (c *Client) ActiveConnNX()
- func (c *Client) Close() (err error)
- func (c *Client) DisablePipeline() (err error)
- func (c *Client) Flush() (err error)
- func (c *Client) LoadBackend(backend_identifier BackendType, location string) (err error)
- func (c *Client) ModelDel(name string) (err error)
- func (c *Client) ModelGet(name string) (data []interface{}, err error)
- func (c *Client) ModelRun(name string, inputs []string, outputs []string) (err error)
- func (c *Client) ModelSet(name string, backend BackendType, device DeviceType, data []byte, ...) (err error)
- func (c *Client) ModelSetFromFile(name string, backend BackendType, device DeviceType, path string, ...) (err error)
- func (c *Client) Pipeline(PipelineAutoFlushAtSize uint32)
- func (c *Client) Receive() (reply interface{}, err error)
- func (c *Client) ScriptDel(name string) (err error)
- func (c *Client) ScriptGet(name string) (data []interface{}, err error)
- func (c *Client) ScriptRun(name string, fn string, inputs []string, outputs []string) (err error)
- func (c *Client) ScriptSet(name string, device DeviceType, script_source string) (err error)
- func (c *Client) ScriptSetFromFile(name string, device DeviceType, path string) error
- func (c *Client) SendAndIncr(commandName string, args redis.Args) (err error)
- func (c *Client) TensorGet(name string, ct TensorContentType) (data []interface{}, err error)
- func (c *Client) TensorGetBlob(name string) (dt DataType, shape []int, data []byte, err error)
- func (c *Client) TensorGetMeta(name string) (dt DataType, shape []int, err error)
- func (c *Client) TensorGetValues(name string) (dt DataType, shape []int, data interface{}, err error)
- func (c *Client) TensorSet(name string, dt DataType, dims []int, data interface{}) (err error)
- type DataType
- type DeviceType
- type TensorContentType
Constants ¶
View Source
const ( // BackendTF represents a TensorFlow backend BackendTF = BackendType("TF") // BackendTorch represents a Torch backend BackendTorch = BackendType("TORCH") // BackendONNX represents an ONNX backend BackendONNX = BackendType("ORT") // DeviceCPU represents a CPU device DeviceCPU = DeviceType("CPU") // DeviceGPU represents a GPU device DeviceGPU = DeviceType("GPU") // TypeFloat represents a float type TypeFloat = DataType("FLOAT") // TypeDouble represents a double type TypeDouble = DataType("DOUBLE") // TypeInt8 represents a int8 type TypeInt8 = DataType("INT8") // TypeInt16 represents a int16 type TypeInt16 = DataType("INT16") // TypeInt32 represents a int32 type TypeInt32 = DataType("INT32") // TypeInt64 represents a int64 type TypeInt64 = DataType("INT64") // TypeUint8 represents a uint8 type TypeUint8 = DataType("UINT8") // TypeUint16 represents a uint16 type TypeUint16 = DataType("UINT16") // TypeFloat32 is an alias for float TypeFloat32 = DataType("FLOAT") // TypeFloat64 is an alias for double TypeFloat64 = DataType("DOUBLE") // TensorContentTypeBLOB is an alias for BLOB tensor content TensorContentTypeBlob = TensorContentType("BLOB") // TensorContentTypeBLOB is an alias for BLOB tensor content TensorContentTypeValues = TensorContentType("VALUES") // TensorContentTypeBLOB is an alias for BLOB tensor content TensorContentTypeMeta = TensorContentType("META") )
Variables ¶
View Source
var ErrNil = errors.New("redisai-go: nil returned")
Functions ¶
func ModelRunArgs ¶
func ProcessTensorReplyBlob ¶
func ProcessTensorReplyMeta ¶
func TensorSetArgs ¶
Types ¶
type Client ¶
type Client struct { Pool *redis.Pool PipelineActive bool PipelineAutoFlushSize uint32 PipelinePos uint32 ActiveConn redis.Conn }
Client is a RedisAI client
func (*Client) ActiveConnNX ¶
func (c *Client) ActiveConnNX()
func (*Client) Close ¶
Close ensures that no connection is kept alive and prior to that we flush all db commands
func (*Client) DisablePipeline ¶
func (*Client) LoadBackend ¶
func (c *Client) LoadBackend(backend_identifier BackendType, location string) (err error)
func (*Client) ModelSet ¶
func (c *Client) ModelSet(name string, backend BackendType, device DeviceType, data []byte, inputs []string, outputs []string) (err error)
ModelSet sets a RedisAI model from a blob
func (*Client) ModelSetFromFile ¶
func (c *Client) ModelSetFromFile(name string, backend BackendType, device DeviceType, path string, inputs []string, outputs []string) (err error)
ModelSetFromFile sets a RedisAI model from a file
func (*Client) ScriptSet ¶
func (c *Client) ScriptSet(name string, device DeviceType, script_source string) (err error)
ScriptSet sets a RedisAI script from a blob
func (*Client) ScriptSetFromFile ¶
func (c *Client) ScriptSetFromFile(name string, device DeviceType, path string) error
ScriptSetFromFile sets a RedisAI script from a file
func (*Client) SendAndIncr ¶
func (*Client) TensorGet ¶
func (c *Client) TensorGet(name string, ct TensorContentType) (data []interface{}, err error)
func (*Client) TensorGetBlob ¶
TensorGetValues gets a tensor's values
func (*Client) TensorGetMeta ¶
TensorGetValues gets a tensor's values
Click to show internal directories.
Click to hide internal directories.