workers

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

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ModelTrainThreshold

type ModelTrainThreshold struct {
	TrainThreshold uint64 `json:"train_threshold"`
	TuneThreshold  uint64 `json:"tune_threshold"`
}

type ModelTrainer

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

func NewModelTrainer

func NewModelTrainer(
	viewModelRepository ViewModelRepository,
	presigner Presigner,
	transactor postgresql.Transactor,
	producer Producer,
	goCronScheduler *gocron.Scheduler,
	thresholds map[string]ModelTrainThreshold,
	logger *zap.Logger,
) *ModelTrainer

func (ModelTrainer) StartTrainModels

func (m ModelTrainer) StartTrainModels(cron string)

StartTrainModels - функция запуска инициализации тренировки моделей по расписанию

type Presigner

type Presigner interface {
	GetPresignURL(ctx context.Context, fileName string) (string, error)
}

type Producer

type Producer interface {
	Publish(queue string, message []byte) error
}

type ViewModelRepository

type ViewModelRepository interface {
	ViewNotLearnedModels(ctx context.Context, modelType string, trainThreshold uint64) ([]data.MLModel, error)
	ViewNotFineTunedFaceModels(ctx context.Context, modelType string, tuneThreshold uint64) ([]data.MLModel, error)
	SetModelStatus(ctx context.Context, status string, modelType string, userID string) error
}

Jump to

Keyboard shortcuts

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