Documentation
¶
Index ¶
- Variables
- func ArtifactIDMap(artifacts []Artifact) map[string]Artifact
- func ArtifactIDs(artifacts []Artifact) []string
- func IsValidContentType(contentType string) bool
- func NewAlreadyInUseErr(s string) error
- func NewBadRequest(s string) error
- func NewInternalErr(s string) error
- func NewInvalidInputErr(s string) error
- func NewNotFoundErr(s string) error
- func NormalizeID(s string) string
- func ParseVal(s string) any
- type Artifact
- type CheckpointArtifact
- type ContentType
- type Experiment
- type GenericMetric
- func (s *GenericMetric[T]) Add(v T)
- func (s *GenericMetric[T]) AddVal(v any)
- func (s *GenericMetric[T]) Commit()
- func (s *GenericMetric[T]) LastVal() any
- func (s GenericMetric[T]) Name() string
- func (s *GenericMetric[T]) SetVals(vs []any)
- func (s *GenericMetric[T]) UnCommited() []T
- func (s GenericMetric[T]) Vals() []any
- func (s GenericMetric[T]) ValsToCommit() []any
- type Metric
- type ModelEntry
- type ModelRegistry
- func (m *ModelRegistry) Add(url string, tags ...string)
- func (m *ModelRegistry) AddTag(tag string, version int) error
- func (m ModelRegistry) LastModel() ModelEntry
- func (m ModelRegistry) LatestVersion() int
- func (m ModelRegistry) MarshalEntries() ([][]byte, error)
- func (m ModelRegistry) ModelByTag(tag string) (ModelEntry, error)
- func (m ModelRegistry) ModelByVersion(version int) (ModelEntry, error)
- func (m ModelRegistry) ModelsByTag(tag string) ([]ModelEntry, error)
- func (m ModelRegistry) VersionTag(version int) string
- type PlainTextArtifact
- type Run
- type SavedArtifact
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func ArtifactIDMap ¶
func ArtifactIDs ¶
func IsValidContentType ¶
func NewAlreadyInUseErr ¶
func NewBadRequest ¶
func NewInternalErr ¶
func NewInvalidInputErr ¶
func NewNotFoundErr ¶
func NormalizeID ¶
Types ¶
type Artifact ¶
type Artifact interface { Name() string Content() []byte ContentType() ContentType }
type CheckpointArtifact ¶
func (CheckpointArtifact) Content ¶
func (c CheckpointArtifact) Content() []byte
func (CheckpointArtifact) ContentType ¶
func (c CheckpointArtifact) ContentType() ContentType
func (CheckpointArtifact) Name ¶
func (c CheckpointArtifact) Name() string
type ContentType ¶
type ContentType string
const ( TextContentType ContentType = "content-type/text" ModelContentType ContentType = "content-type/model" )
type Experiment ¶
type GenericMetric ¶
type GenericMetric[T constraints.Ordered] struct { Key string Values []T // contains filtered or unexported fields }
func NewGenericMetric ¶
func NewGenericMetric[T constraints.Ordered](key string, sizeAlloc int) *GenericMetric[T]
func (*GenericMetric[T]) Add ¶
func (s *GenericMetric[T]) Add(v T)
func (*GenericMetric[T]) AddVal ¶
func (s *GenericMetric[T]) AddVal(v any)
func (*GenericMetric[T]) Commit ¶
func (s *GenericMetric[T]) Commit()
func (*GenericMetric[T]) LastVal ¶
func (s *GenericMetric[T]) LastVal() any
func (GenericMetric[T]) Name ¶
func (s GenericMetric[T]) Name() string
func (*GenericMetric[T]) SetVals ¶
func (s *GenericMetric[T]) SetVals(vs []any)
func (*GenericMetric[T]) UnCommited ¶
func (s *GenericMetric[T]) UnCommited() []T
func (GenericMetric[T]) Vals ¶
func (s GenericMetric[T]) Vals() []any
func (GenericMetric[T]) ValsToCommit ¶
func (s GenericMetric[T]) ValsToCommit() []any
type ModelEntry ¶
type ModelRegistry ¶
type ModelRegistry struct { Name string Models []ModelEntry Tags map[string][]int }
func NewModelRegistry ¶
func NewModelRegistry(name string) *ModelRegistry
func (*ModelRegistry) Add ¶
func (m *ModelRegistry) Add(url string, tags ...string)
Add registers a model checkpoint with a highest version number. Additional tags can be supplied such (`latest`, `prod`, `dev`)
func (ModelRegistry) LastModel ¶
func (m ModelRegistry) LastModel() ModelEntry
func (ModelRegistry) LatestVersion ¶
func (m ModelRegistry) LatestVersion() int
func (ModelRegistry) MarshalEntries ¶
func (m ModelRegistry) MarshalEntries() ([][]byte, error)
func (ModelRegistry) ModelByTag ¶
func (m ModelRegistry) ModelByTag(tag string) (ModelEntry, error)
func (ModelRegistry) ModelByVersion ¶
func (m ModelRegistry) ModelByVersion(version int) (ModelEntry, error)
func (ModelRegistry) ModelsByTag ¶
func (m ModelRegistry) ModelsByTag(tag string) ([]ModelEntry, error)
func (ModelRegistry) VersionTag ¶
func (m ModelRegistry) VersionTag(version int) string
type PlainTextArtifact ¶
func (PlainTextArtifact) Content ¶
func (p PlainTextArtifact) Content() []byte
func (PlainTextArtifact) ContentType ¶
func (p PlainTextArtifact) ContentType() ContentType
func (PlainTextArtifact) Name ¶
func (p PlainTextArtifact) Name() string
type Run ¶
type Run struct { Name string Timestamp time.Time ExperimentID string Metrics map[string]Metric Artifacts map[string]Artifact }
func (Run) ArtifactsSlice ¶
type SavedArtifact ¶
type SavedArtifact struct { Name string ContentType ContentType S3Key string }
Click to show internal directories.
Click to hide internal directories.