server

package
v0.11.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Copyright 2021 IBM Corporation

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

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