server

package
v0.12.0-rc0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StateManagerChannelLength = 25
)

Variables

View Source
var PurgeExcludePrefixes = []string{"_"}

Functions

This section is empty.

Types

type PullerServer

type PullerServer struct {
	Log logr.Logger

	// embed generated Unimplemented type for forward-compatibility for gRPC
	mmesh.UnimplementedModelRuntimeServer
	// contains filtered or unexported fields
}

PullerServer represents the GRPC server and its configuration

func NewPullerServer

func NewPullerServer(log logr.Logger) *PullerServer

NewPullerServer creates a new PullerServer instance and initializes it with configuration from the environment

func NewPullerServerFromConfig

func NewPullerServerFromConfig(log logr.Logger, config *PullerServerConfiguration) *PullerServer

NewPullerServerFromConfig creates a new PullerServer instance with the given configuration

func (*PullerServer) LoadModel

LoadModel loads a model and returns when model is fully loaded. See model-runtime.proto loadModel()

func (*PullerServer) ModelSize

ModelSize calculates the size (memory consumption) of a currently-loaded model. See model-runtime.proto modelSize() This is a Direct passthrough to the model runtime grpc

func (*PullerServer) PredictModelSize

PredictModelSize predicts the size of not-yet-loaded model - must return almost immediately. See model-runtime.proto predictModelSize() This is a Direct passthrough to the model runtime grpc

func (*PullerServer) RuntimeStatus

RuntimeStatus provides basic runtime status and parameters; called only during startup. This is a Direct passthrough to the model runtime grpc See model-runtime.proto runtimeStatus()

func (*PullerServer) StartServer

func (s *PullerServer) StartServer() error

StartServer runs the gRPC server. This func will not return unless the server fails.

func (*PullerServer) UnloadModel

UnloadModel unloads a previously loaded (or failed) model and returns when model is fully unloaded, or immediately if not found/loaded. See model-runtime.proto unloadModel()

type PullerServerConfiguration

type PullerServerConfiguration struct {
	Port                int    // Port to run this puller grpc server
	ModelServerEndpoint string // model server endpoint
}

PullerServerConfiguration stores configuration variables for the puller server

func GetPullerServerConfigFromEnv

func GetPullerServerConfigFromEnv(log logr.Logger) *PullerServerConfiguration

GetPullerServerConfigFromEnv creates a new PullerConfiguration populated from environment variables

Jump to

Keyboard shortcuts

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