artifact

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Code

type Code struct {
	Path        string `json:"path,omitempty" yaml:"path,omitempty"`
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	License     string `json:"license,omitempty" yaml:"license,omitempty"`
	*LayerInfo  `json:",inline" yaml:",inline"`
}

type DataSet

type DataSet struct {
	Name        string `json:"name,omitempty" yaml:"name,omitempty"`
	Path        string `json:"path,omitempty" yaml:"path,omitempty"`
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	License     string `json:"license,omitempty" yaml:"license,omitempty"`
	// Parameters is an arbitrary section of yaml that can be used to store any additional
	// metadata relevant to the dataset, with a few caveats:
	//  * Only a json-compatible subset of yaml is supported
	//  * Strings will be serialized without flow parameters, etc.
	//  * Numbers will be converted to decimal representations
	//  * Maps will be sorted alphabetically by key
	//  * It's recommended to store metadata like preprocessing steps, formats, etc.
	Parameters any `json:"parameters,omitempty" yaml:"parameters,omitempty"`
	*LayerInfo `json:",inline" yaml:",inline"`
}

type Docs

type Docs struct {
	Path        string `json:"path" yaml:"path"`
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	*LayerInfo  `json:",inline" yaml:",inline"`
}

type KitFile

type KitFile struct {
	ManifestVersion string    `json:"manifestVersion" yaml:"manifestVersion"`
	Package         Package   `json:"package,omitempty" yaml:"package,omitempty"`
	Model           *Model    `json:"model,omitempty" yaml:"model,omitempty"`
	Code            []Code    `json:"code,omitempty" yaml:"code,omitempty"`
	DataSets        []DataSet `json:"datasets,omitempty" yaml:"datasets,omitempty"`
	Docs            []Docs    `json:"docs,omitempty" yaml:"docs,omitempty"`
}

func (*KitFile) LoadModel

func (kf *KitFile) LoadModel(kitfileContent io.ReadCloser) error

func (*KitFile) MarshalToJSON

func (kf *KitFile) MarshalToJSON() ([]byte, error)

func (*KitFile) MarshalToYAML

func (kf *KitFile) MarshalToYAML() ([]byte, error)

func (*KitFile) ToModelPackConfig added in v1.10.0

func (kf *KitFile) ToModelPackConfig(diffIDs []digest.Digest) modelspecv1.Model

type LayerInfo

type LayerInfo struct {
	// Digest for the layer corresponding to this element
	Digest string `json:"digest,omitempty" yaml:"-"`
	// Diff ID (uncompressed digest) for the layer corresponding to this element
	DiffId string `json:"diffId,omitempty" yaml:"-"`
}

type Model

type Model struct {
	Name        string      `json:"name,omitempty" yaml:"name,omitempty"`
	Path        string      `json:"path,omitempty" yaml:"path,omitempty"`
	License     string      `json:"license,omitempty" yaml:"license,omitempty"`
	Framework   string      `json:"framework,omitempty" yaml:"framework,omitempty"`
	Format      string      `json:"format,omitempty" yaml:"format,omitempty"`
	Version     string      `json:"version,omitempty" yaml:"version,omitempty"`
	Description string      `json:"description,omitempty" yaml:"description,omitempty"`
	Parts       []ModelPart `json:"parts,omitempty" yaml:"parts,omitempty"`
	// Parameters is an arbitrary section of yaml that can be used to store any additional
	// data that may be relevant to the current model, with a few caveats:
	//  * Only a json-compatible subset of yaml is supported
	//  * Strings will be serialized without flow parameters, etc.
	//  * Numbers will be converted to decimal representations (0xFF -> 255, 1.2e+3 -> 1200)
	//  * Maps will be sorted alphabetically by key
	Parameters any `json:"parameters,omitempty" yaml:"parameters,omitempty"`
	*LayerInfo `json:",inline" yaml:",inline"`
}

type ModelPart

type ModelPart struct {
	Name       string `json:"name,omitempty" yaml:"name,omitempty"`
	Path       string `json:"path,omitempty" yaml:"path,omitempty"`
	License    string `json:"license,omitempty" yaml:"license,omitempty"`
	Type       string `json:"type,omitempty" yaml:"type,omitempty"`
	*LayerInfo `json:",inline" yaml:",inline"`
}

type Package

type Package struct {
	Name        string   `json:"name,omitempty" yaml:"name,omitempty"`
	Version     string   `json:"version,omitempty" yaml:"version,omitempty"`
	Description string   `json:"description,omitempty" yaml:"description,omitempty"`
	License     string   `json:"license,omitempty" yaml:"license,omitempty"`
	Authors     []string `json:"authors,omitempty" yaml:"authors,omitempty,flow"`
}

Jump to

Keyboard shortcuts

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