Documentation
¶
Index ¶
- Constants
- func CopyModelFile(src, dst string) error
- func CreateArchiveWithProgress(srcDir, modelName, version string, progressWriter io.Writer) (string, error)
- func DeleteModel(homePath, modelName, version string) error
- func ExportModel(homePath, modelName, version, outputPath string) error
- func FillMinimalModelYAML(y *ModelYAML, name, version, hfRepo string, size int64) error
- func GenerateVersion() (*string, error)
- func GetModelPath(homePath, modelName, version string) (string, error)
- func ImportModel(homePath string, reader io.Reader, name, version string, force bool, ...) error
- type Model
- type ModelMeta
- type ModelYAML
Constants ¶
View Source
const (
ModelYAMLFileName = "model.yaml"
)
Variables ¶
This section is empty.
Functions ¶
func CopyModelFile ¶
CopyModelFile copies a model file to a temporary location
func DeleteModel ¶
DeleteModel deletes a model from BentoML store
func ExportModel ¶
ExportModel exports a model from BentoML store to a file
func FillMinimalModelYAML ¶
func GenerateVersion ¶
GenerateVersion returns a 16‑char, lowercase base‑32 string identical to BentoML's default.
func GetModelPath ¶
GetModelPath returns the path where a model is stored in BentoML home
Types ¶
type Model ¶
type Model struct {
Tag string `json:"tag"`
Module string `json:"module"`
Size string `json:"size"`
CreationTime string `json:"creation_time"`
}
func ListModels ¶
ListModels traverses $homePath/bentoml/models and aggregates model.yaml / model.json files. It is API‑compatible with the original CLI‑based ListModels but avoids forking Python.
type ModelMeta ¶
type ModelMeta struct {
Name string `yaml:"name" json:"name"`
Version string `yaml:"version" json:"version"`
Module string `yaml:"module" json:"module"`
Size string `yaml:"size" json:"size"`
CreationTime string `yaml:"creation_time" json:"creation_time"`
}
func GetModelDetail ¶
GetModelDetail gets detailed information about a specific model
type ModelYAML ¶
type ModelYAML struct {
Name string `yaml:"name"`
Version string `yaml:"version"`
Module string `yaml:"module"`
Size string `yaml:"size,omitempty"`
APIVersion string `yaml:"api_version"`
Signatures map[string]interface{} `yaml:"signatures"`
Labels map[string]string `yaml:"labels"`
Options map[string]interface{} `yaml:"options"`
Metadata map[string]interface{} `yaml:"metadata"`
Context struct {
FrameworkName string `yaml:"framework_name"`
FrameworkVersion map[string]string `yaml:"framework_versions"`
BentoVersion string `yaml:"bentoml_version"`
PythonVersion string `yaml:"python_version"`
} `yaml:"context"`
CreationTime string `yaml:"creation_time"`
}
Click to show internal directories.
Click to hide internal directories.