v1

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// BackendTypeTensorRT indicates tensortt backend
	BackendTypeTensorRT = "tensorrt"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Component

type Component struct {
	Dst string `yaml:"dst" json:"dst,omitempty"`
	Src Src    `yaml:"src" json:"src,omitempty"`
}

Component represents source and destination for model files

type File

type File struct {
	Name string `yaml:"name" json:"name,omitempty"`
}

File represents the model files

func (*File) UnmarshalYAML

func (f *File) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML unmarshalls given yaml data into NIM manifest struct

type NIMManifest

type NIMManifest map[string]NIMProfile

NIMManifest is the model manifest file

func (NIMManifest) GetProfileModel

func (manifest NIMManifest) GetProfileModel(profileID string) string

func (NIMManifest) GetProfileRelease

func (manifest NIMManifest) GetProfileRelease(profileID string) string

func (NIMManifest) GetProfileTags

func (manifest NIMManifest) GetProfileTags(profileID string) map[string]string

func (NIMManifest) GetProfilesList

func (manifest NIMManifest) GetProfilesList() []string

func (NIMManifest) MatchProfiles

func (manifest NIMManifest) MatchProfiles(modelSpec appsv1alpha1.ModelSpec, discoveredGPUs []string) ([]string, error)

type NIMParser

type NIMParser struct{}

func (NIMParser) ParseModelManifest

func (NIMParser) ParseModelManifest(filePath string) (nimparser.NIMManifestInterface, error)

func (NIMParser) ParseModelManifestFromRawOutput

func (NIMParser) ParseModelManifestFromRawOutput(data []byte) (nimparser.NIMManifestInterface, error)

type NIMProfile

type NIMProfile struct {
	Model        string            `yaml:"model" json:"model,omitempty"`
	Release      string            `yaml:"release" json:"release,omitempty"`
	Tags         map[string]string `yaml:"tags" json:"tags,omitempty"`
	ContainerURL string            `yaml:"container_url" json:"container_url,omitempty"`
	Workspace    Workspace         `yaml:"workspace" json:"workspace,omitempty"`
}

NIMProfile is the model profile supported by the NIM container

type Src

type Src struct {
	RepoID string `yaml:"repo_id" json:"repo_id,omitempty"`
	Files  []File `yaml:"files" json:"files,omitempty"`
}

Src represents model source

func (*Src) UnmarshalYAML

func (s *Src) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML is the custom unmarshal function for Src

type Workspace

type Workspace struct {
	Components []Component `yaml:"components" json:"components,omitempty"`
}

Workspace represents workspace for model components

Jump to

Keyboard shortcuts

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