Documentation
¶
Index ¶
- func GetKitfileForRef(ctx context.Context, configHome string, ref *registry.Reference) (*artifact.KitFile, error)
- func GetKitfileForRefString(ctx context.Context, configHome string, ref string) (*artifact.KitFile, error)
- func ResolveKitfile(ctx context.Context, configHome, kitfileRef, baseRef string) (*artifact.KitFile, error)
- func SaveModel(ctx context.Context, localRepo local.LocalRepo, kitfile *artifact.KitFile, ...) (*ocispec.Descriptor, error)
- func ValidateKitfile(kf *artifact.KitFile) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetKitfileForRef ¶
func GetKitfileForRefString ¶
func ResolveKitfile ¶
func ResolveKitfile(ctx context.Context, configHome, kitfileRef, baseRef string) (*artifact.KitFile, error)
ResolveKitfile returns the Kitfile for a reference. Any references to other modelkits are fetched and included in the resolved Kitfile, giving the equivalent Kitfile including the model, datasets, and code from those referenced modelkits.
func SaveModel ¶
func SaveModel(ctx context.Context, localRepo local.LocalRepo, kitfile *artifact.KitFile, ignore filesystem.IgnorePaths, compression string) (*ocispec.Descriptor, error)
SaveModel saves an *artifact.Model to the provided oras.Target, compressing layers. It attempts to block modelkits that include paths that leave the base context directory, allowing only subdirectories of the root context to be included in the modelkit.
func ValidateKitfile ¶
ValidateKitfile returns an error if the parsed Kitfile is not valid. The error string is multiple lines, each consisting of an issue in the kitfile (e.g. duplicate path).
Types ¶
This section is empty.