Documentation
¶
Overview ¶
Package machinelearning owns FrogML's versioned model layout and publication invariants. Temporary uploads are never published model versions.
Index ¶
- Constants
- func CheckTransaction(ctx context.Context, env format.Env, c repo.Config, id Identity, tx string, ...) error
- func File(s string) bool
- func Missing(err error) bool
- func Name(s string) bool
- func Private(p string) bool
- func Publication(ctx context.Context) context.Context
- func Segment(s string) bool
- func Serves(t repo.PackageType) bool
- func Transaction(s string) bool
- func Verify(ctx context.Context, env format.Env, c repo.Config, prefix string, m Manifest) ([]types.Item, error)
- func Version(s string) bool
- type Artifact
- type Checksums
- type FileEntry
- type Handler
- func (Handler) Admit(ctx context.Context, env format.Env, c repo.Config, w format.Write) (format.Write, error)
- func (Handler) Classify(_ repo.Config, p string) format.Class
- func (h Handler) Deleted(ctx context.Context, env format.Env, c repo.Config, _ []types.Item) error
- func (h Handler) Deployed(ctx context.Context, env format.Env, c repo.Config, it types.Item) error
- func (Handler) GuardTransferSource(ctx context.Context, env format.Env, c repo.Config, it types.Item) error
- func (Handler) Reindex(ctx context.Context, env format.Env, c repo.Config) error
- func (Handler) Resolve(ctx context.Context, env format.Env, c repo.Config, d format.Download) (string, error)
- type Identity
- type Manifest
- type Serialization
Constants ¶
View Source
const ( ManifestName = "model-manifest.json" TransactionName = ".transaction.json" MaxManifestSize = 4 << 20 MaxFiles = 10000 MaxFileSize = 10 << 30 )
Variables ¶
This section is empty.
Functions ¶
func CheckTransaction ¶
func CheckTransaction( ctx context.Context, env format.Env, c repo.Config, id Identity, tx string, by string, ) error
CheckTransaction rechecks ownership and expiry on every upload and commit. Knowing the millisecond transaction ID is not an authorization capability.
func Private ¶
Private identifies staging records and manifests, which must not bypass transaction ownership or the native manifest's per-artifact authorization.
func Publication ¶
Publication is used only inside the native transaction which verifies every file before publishing the manifest and rebuilding the index once.
func Serves ¶
func Serves(t repo.PackageType) bool
func Transaction ¶
Types ¶
type Handler ¶
func (Handler) GuardTransferSource ¶
type Identity ¶
type Identity struct{ Name, Version string }
Identity names a model, optionally within one SDK namespace, and its version.
type Manifest ¶
type Manifest struct {
Created string `json:"created_date"`
Artifacts []Artifact `json:"model_artifacts"`
Format Serialization `json:"model_format"`
Dependencies []Artifact `json:"dependency_artifacts,omitempty"`
Code *Artifact `json:"code_artifacts,omitempty"`
ID string `json:"id,omitempty"`
Version string `json:"version,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.