checkpoints

package
v0.750.3 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckpointByUUID

func CheckpointByUUID(ctx context.Context, id uuid.UUID) (*model.Checkpoint, error)

CheckpointByUUID looks up a checkpoint by UUID, returning nil if none exists.

func CheckpointByUUIDs

func CheckpointByUUIDs(ctx context.Context, ckptUUIDs []uuid.UUID) ([]model.Checkpoint, error)

CheckpointByUUIDs looks up a checkpoint by list of UUIDS, returning nil if error.

func GetModelIDsAssociatedWithCheckpoint

func GetModelIDsAssociatedWithCheckpoint(ctx context.Context, ckptUUID uuid.UUID) ([]int32, error)

GetModelIDsAssociatedWithCheckpoint returns the model ids associated with a checkpoint, returning nil if error.

func GetRegisteredCheckpoints

func GetRegisteredCheckpoints(ctx context.Context, checkpoints []uuid.UUID) (map[uuid.UUID]ModelInfo, error)

GetRegisteredCheckpoints gets the checkpoints in the model registrys from the list of checkpoints provided.

func MarkCheckpointsDeleted

func MarkCheckpointsDeleted(ctx context.Context, deleteCheckpoints []uuid.UUID) error

MarkCheckpointsDeleted updates the provided delete checkpoints to DELETED state.

func UpdateCheckpointSizeTx

func UpdateCheckpointSizeTx(ctx context.Context, idb bun.IDB, checkpoints []uuid.UUID) error

UpdateCheckpointSizeTx updates checkpoint size and count to experiment and trial.

Types

type ExperimentCheckpointGrouping

type ExperimentCheckpointGrouping struct {
	ExperimentID       int    `bun:"experimentid"`
	CheckpointUUIDSStr string `bun:"checkpointuuidsstr"`
}

ExperimentCheckpointGrouping represents a mapping of checkpoint uuids to experiment id.

func GroupCheckpointUUIDsByExperimentID

func GroupCheckpointUUIDsByExperimentID(ctx context.Context, checkpoints []uuid.UUID) (
	[]*ExperimentCheckpointGrouping, error,
)

GroupCheckpointUUIDsByExperimentID creates the mapping of checkpoint uuids to experiment id. The checkpount uuids grouped together are comma separated.

type ModelInfo

type ModelInfo struct {
	ID      int
	Version int
	Name    string
}

ModelInfo is a struct containing info used for locating models.

Jump to

Keyboard shortcuts

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