inspectors

package
v0.0.0-...-58c3220 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewInspectorsMap

func NewInspectorsMap(istioURLString string, client httpClient) (map[string]ModelServerInspector, error)

Types

type ModelServerInspector

type ModelServerInspector interface {
	// Discover ML Server endpoints under the prefix
	// and return model Metadata and Swagger if it is possible
	// return error if Web API behind prefix is not compatible with
	// MLServer
	Inspect(prefix string, hostHeader string, log *zap.SugaredLogger) (model_types.ServedModel, error)
}

ModelServerInspector gets URL prefix for a deployed model It return Metadata and Swagger2 if passed prefix is served by MLServer that is known for ModelServerInspector otherwise returns error

type OdahuMLServerInspector

type OdahuMLServerInspector struct {
	EdgeURL    url.URL
	HTTPClient httpClient
}

func (OdahuMLServerInspector) Inspect

func (o OdahuMLServerInspector) Inspect(
	prefix string, hostHeader string, log *zap.SugaredLogger) (model model_types.ServedModel, err error)

type SwaggerMetadata

type SwaggerMetadata struct {
	Info struct {
		Title   string `json:"title"`
		Version string `json:"version"`
	} `json:"info"`
}

Part of swagger spec responsible for model name/version

type TritonInspector

type TritonInspector struct {
	EdgeURL    url.URL
	HTTPClient httpClient
}

func (TritonInspector) Inspect

func (t TritonInspector) Inspect(prefix string, hostHeader string, log *zap.SugaredLogger) (
	model_types.ServedModel, error,
)

type TritonModelMeta

type TritonModelMeta struct {
	Name    string `json:"name"`
	Version string `json:"version"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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