cli

package
v2.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2023 License: Apache-2.0 Imports: 34 Imported by: 1

Documentation

Index

Constants

View Source
const (
	KafkaConfigProtocolSSL          = "ssl"
	KafkaConfigProtocolSASLSSL      = "sasl_ssl"
	KafkaConfigProtocolSASLPlaintxt = "sasl_plaintxt"
)
View Source
const (
	InspectFormatRaw  = "raw"
	InspectFormatJson = "json"
)

CLI constants

View Source
const (
	SeldonModelHeader    = "seldon-model"
	SeldonRouteHeader    = "x-seldon-route"
	SeldonPipelineHeader = "pipeline"
	HeaderSeparator      = "="
)
View Source
const (
	SeldonDefaultTopicPrefix = "seldon"
	InputsSpecifier          = "inputs"
	OutputsSpecifier         = "outputs"
	PipelineSpecifier        = "pipeline"
	ModelSpecifier           = "model"

	DefaultNamespace = "default"
)
View Source
const (
	Undefined seldonKind = iota
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CallOptions

type CallOptions struct {
	InferProtocol string // REST or gRPC
	InferType     InferType
	StickySession bool
	Iterations    int
	Seconds       int64
}

type ControlPlane

type ControlPlane struct {
	SchedulerHost string `json:"schedulerHost,omitempty"`
	Tls           bool   `json:"tls,omitempty"`
	KeyPath       string `json:"keyPath,omitempty"`
	CrtPath       string `json:"crtPath,omitempty"`
	CaPath        string `json:"caPath,omitempty"`
}

type Dataplane

type Dataplane struct {
	InferHost     string `json:"inferHost,omitempty"`
	Tls           bool   `json:"tls,omitempty"`
	SkipSSLVerify bool   `json:"skipSSLVerify,omitempty"`
	KeyPath       string `json:"keyPath,omitempty"`
	CrtPath       string `json:"crtPath,omitempty"`
	CaPath        string `json:"caPath,omitempty"`
}

type InferType

type InferType uint32
const (
	InferModel InferType = iota
	InferPipeline
	InferExplainer
)

type InferenceClient

type InferenceClient struct {
	// contains filtered or unexported fields
}

func NewInferenceClient

func NewInferenceClient(host string, hostIsSet bool) (*InferenceClient, error)

func (*InferenceClient) Infer

func (ic *InferenceClient) Infer(
	modelName string,
	data []byte,
	headers []string,
	authority string,
	callOptions *CallOptions,
	logOptions *LogOptions,
) error

func (*InferenceClient) InferGrpc

func (ic *InferenceClient) InferGrpc(
	resourceName string,
	data []byte,
	headers []string,
	authority string,
	stickySessionKeys []string,
	callOptions *CallOptions,
	logOptions *LogOptions,
) error

func (*InferenceClient) InferRest

func (ic *InferenceClient) InferRest(
	resourceName string,
	data []byte,
	headers []string,
	authority string,
	stickySessionKeys []string,
	callOptions *CallOptions,
	logOptions *LogOptions,
) error

func (*InferenceClient) ModelMetadata

func (ic *InferenceClient) ModelMetadata(modelName string, authority string) error

type KafkaClient

type KafkaClient struct {
	// contains filtered or unexported fields
}

func NewKafkaClient

func NewKafkaClient(kafkaBroker string, kafkaBrokerIsSet bool, schedulerHost string, schedulerHostIsSet bool) (*KafkaClient, error)

func (*KafkaClient) InspectStep

func (kc *KafkaClient) InspectStep(pipelineStep string, offset int64, key string, format string, verbose bool, truncateData bool, namespace string) error

type KafkaConfig

type KafkaConfig struct {
	Bootstrap    string `json:"bootstrap,omitempty"`
	Namespace    string `json:"namespace,omitempty"`
	Protocol     string `json:"protocol,omitempty"`
	KeyPath      string `json:"keyPath,omitempty"`
	CrtPath      string `json:"crtPath,omitempty"`
	CaPath       string `json:"caPath,omitempty"`
	SaslUsername string `json:"saslUsername,omitempty"`
	SaslPassword string `json:"saslPassword,omitempty"`
	TopicPrefix  string `json:"topicPrefix,omitempty"`
}

type KafkaInspect

type KafkaInspect struct {
	Topics []*KafkaInspectTopic `json:"topics"`
}

type KafkaInspectTopic

type KafkaInspectTopic struct {
	Name string                      `json:"name"`
	Msgs []*KafkaInspectTopicMessage `json:"msgs"`
}

type KafkaInspectTopicMessage

type KafkaInspectTopicMessage struct {
	Headers map[string][]string `json:"headers"`
	Key     string              `json:"key"`
	Value   json.RawMessage     `json:"value"`
}

type LogOptions

type LogOptions struct {
	ShowHeaders  bool
	ShowRequest  bool
	ShowResponse bool
}

type PipelineTopics

type PipelineTopics struct {
	// contains filtered or unexported fields
}

type SchedulerClient

type SchedulerClient struct {
	// contains filtered or unexported fields
}

func NewSchedulerClient

func NewSchedulerClient(schedulerHost string, schedulerHostIsSet bool, authority string) (*SchedulerClient, error)

func (*SchedulerClient) ExperimentStatus

func (sc *SchedulerClient) ExperimentStatus(experimentName string, showRequest bool, showResponse bool, wait bool) error

func (*SchedulerClient) ListExperiments

func (sc *SchedulerClient) ListExperiments() error

func (*SchedulerClient) ListModels

func (sc *SchedulerClient) ListModels() error

func (*SchedulerClient) ListPipelines

func (sc *SchedulerClient) ListPipelines() error

func (*SchedulerClient) ListServers

func (sc *SchedulerClient) ListServers() error

func (*SchedulerClient) Load added in v2.4.0

func (sc *SchedulerClient) Load(data []byte, showRequest bool, showResponse bool) error

func (*SchedulerClient) LoadModel

func (sc *SchedulerClient) LoadModel(data []byte, showRequest bool, showResponse bool) error

func (*SchedulerClient) LoadPipeline

func (sc *SchedulerClient) LoadPipeline(data []byte, showRequest bool, showResponse bool) error

func (*SchedulerClient) ModelStatus

func (sc *SchedulerClient) ModelStatus(modelName string, showRequest bool, showResponse bool, waitCondition string) error

func (*SchedulerClient) PipelineStatus

func (sc *SchedulerClient) PipelineStatus(pipelineName string, showRequest bool, showResponse bool, waitCondition string) error

func (*SchedulerClient) ServerStatus

func (sc *SchedulerClient) ServerStatus(serverName string, showRequest bool, showResponse bool) error

func (*SchedulerClient) StartExperiment

func (sc *SchedulerClient) StartExperiment(data []byte, showRequest bool, showResponse bool) error

func (*SchedulerClient) Status added in v2.4.0

func (sc *SchedulerClient) Status(data []byte, showRequest bool, showResponse bool, wait bool) error

func (*SchedulerClient) StopExperiment

func (sc *SchedulerClient) StopExperiment(experimentName string, experimentBytes []byte, showRequest bool, showResponse bool) error

func (*SchedulerClient) Unload added in v2.4.0

func (sc *SchedulerClient) Unload(data []byte, showRequest bool, showResponse bool) error

func (*SchedulerClient) UnloadModel

func (sc *SchedulerClient) UnloadModel(modelName string, modelBytes []byte, showRequest bool, showResponse bool) error

func (*SchedulerClient) UnloadPipeline

func (sc *SchedulerClient) UnloadPipeline(pipelineName string, pipelineBytes []byte, showRequest bool, showResponse bool) error

type SeldonCLIConfig

type SeldonCLIConfig struct {
	Dataplane    *Dataplane    `json:"dataplane,omitempty"`
	Controlplane *ControlPlane `json:"controlplane,omitempty"`
	Kafka        *KafkaConfig  `json:"kafka,omitempty"`
}

start config struct

func LoadSeldonCLIConfig

func LoadSeldonCLIConfig() (*SeldonCLIConfig, error)

type SeldonCLIConfigs added in v2.4.0

type SeldonCLIConfigs struct {
	Configs map[string]string `json:"configs,omitempty"`
	Active  *string           `json:"active,omitempty"`
}

func LoadSeldonCLIConfigs added in v2.4.0

func LoadSeldonCLIConfigs() (*SeldonCLIConfigs, error)

func (*SeldonCLIConfigs) Activate added in v2.4.0

func (sc *SeldonCLIConfigs) Activate(key string) error

func (*SeldonCLIConfigs) Add added in v2.4.0

func (sc *SeldonCLIConfigs) Add(key string, configPath string) error

func (*SeldonCLIConfigs) Deactivate added in v2.4.0

func (sc *SeldonCLIConfigs) Deactivate(key string) error

func (*SeldonCLIConfigs) List added in v2.4.0

func (sc *SeldonCLIConfigs) List(key string) error

func (*SeldonCLIConfigs) Remove added in v2.4.0

func (sc *SeldonCLIConfigs) Remove(key string) error

type V2Error

type V2Error struct {
	Error string `json:"error"`
}

type V2InferenceResponse

type V2InferenceResponse struct {
	ModelName    string                 `json:"model_name,omitempty"`
	ModelVersion string                 `json:"model_version,omitempty"`
	Id           string                 `json:"id"`
	Parameters   map[string]interface{} `json:"parameters,omitempty"`
	Outputs      []interface{}          `json:"outputs,omitempty"`
}

type V2Metadata

type V2Metadata struct {
	Name     string             `json:"name"`
	Versions []string           `json:"versions,omitempty"`
	Platform string             `json:"platform,omitempty"`
	Inputs   []V2MetadataTensor `json:"inputs,omitempty"`
	Outputs  []V2MetadataTensor `json:"outputs,omitempty"`
}

type V2MetadataTensor

type V2MetadataTensor struct {
	Name     string `json:"name"`
	Datatype string `json:"datatype"`
	Shape    []int  `json:"shape"`
}

Jump to

Keyboard shortcuts

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