data

package
v0.0.0-...-ce453ac Latest Latest
Warning

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

Go to latest
Published: May 25, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatusNotTrain       = "not_train"
	StatusInTrainProcess = "in_train_process"
	StatusInTuneProcess  = "in_tune_process"
	StatusTrained        = "train"
)
View Source
const (
	FaceModel = "face_model"
)
View Source
const (
	ModelsTable = "models"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type MLModel

type MLModel struct {
	UserID           string  `db:"user_id"`
	ModelFeatures    uint64  `db:"features_count"`
	ModelTrainStatus string  `db:"train_status"`
	ModelType        string  `db:"model_type"`
	S3Key            *string `db:"s3_key"`
}

type Repository

type Repository struct {
	// contains filtered or unexported fields
}

func NewRepository

func NewRepository(db postgresql.DB) *Repository

func (*Repository) ChangeFeaturesCount

func (r *Repository) ChangeFeaturesCount(ctx context.Context, userID, modelType string, featuresCount int) error

func (*Repository) CreateModel

func (r *Repository) CreateModel(ctx context.Context, userID, modelType string) error

func (*Repository) GetModelByUserID

func (r *Repository) GetModelByUserID(ctx context.Context, userID, modelType string) (*MLModel, error)

func (*Repository) GetModelsByUserID

func (r *Repository) GetModelsByUserID(ctx context.Context, userID string) ([]MLModel, error)

func (*Repository) SetFeaturesCountUsed

func (r *Repository) SetFeaturesCountUsed(ctx context.Context, userID, modelType string, featuresCount int) error

func (*Repository) SetModelS3Key

func (r *Repository) SetModelS3Key(ctx context.Context, s3Key, modelType, userID string) error

func (*Repository) SetModelStatus

func (r *Repository) SetModelStatus(ctx context.Context, status, modelType string, userID string) error

func (*Repository) ViewNotFineTunedFaceModels

func (r *Repository) ViewNotFineTunedFaceModels(ctx context.Context, modelType string, tuneThreshold uint64) ([]MLModel, error)

func (*Repository) ViewNotLearnedModels

func (r *Repository) ViewNotLearnedModels(ctx context.Context, modelType string, trainThreshold uint64) ([]MLModel, error)

Jump to

Keyboard shortcuts

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