modelschema

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: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BYTES  string = "BYTES"
	BOOL   string = "BOOL"
	UINT8  string = "UINT8"
	UINT16 string = "UINT16"
	UINT32 string = "UINT32"
	UINT64 string = "UINT64"
	INT8   string = "INT8"
	INT16  string = "INT16"
	INT32  string = "INT32"
	INT64  string = "INT64"
	FP16   string = "FP16"
	FP32   string = "FP32"
	FP64   string = "FP64"
	// extensions to KFSv2 types
	STRING string = "STRING"
)

Possible values for Datatype

View Source
const ModelSchemaFile string = "_schema.json"

Filename for the schema JSON

Variables

This section is empty.

Functions

This section is empty.

Types

type ModelSchema

type ModelSchema struct {
	Inputs  []TensorMetadata `json:"inputs,omitempty"`
	Outputs []TensorMetadata `json:"outputs,omitempty"`
}

ModelSchema is a subset of the KFSv2 Model Metadata https://github.com/kserve/kserve/blob/master/docs/predict-api/v2/required_api.md#model-metadata

func NewFromFile

func NewFromFile(schemaFilename string) (*ModelSchema, error)

type TensorMetadata

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

Jump to

Keyboard shortcuts

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