batchensembling

package
v0.0.0-...-be214e9 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (

	// SparkApplicationStateRunning is when the spark application is still running
	SparkApplicationStateRunning = SparkApplicationState(iota)
	// SparkApplicationStateCompleted is when the spark application has completed its run
	SparkApplicationStateCompleted
	// SparkApplicationStateFailed is when the spark application has failed its run
	SparkApplicationStateFailed
	// SparkApplicationStateUnknown is when the spark application state is unknown
	SparkApplicationStateUnknown
)

Variables

This section is empty.

Functions

func NewBatchEnsemblingJobRunner

func NewBatchEnsemblingJobRunner(
	ensemblingController EnsemblingController,
	ensemblingJobService service.EnsemblingJobService,
	ensemblersService service.EnsemblersService,
	mlpService service.MLPService,
	imageBuilder imagebuilder.ImageBuilder,
	recordsToProcessInOneIteration int,
	maxRetryCount int,
	imageBuildTimeoutDuration time.Duration,
	timeInterval time.Duration,
) batchrunner.BatchJobRunner

NewBatchEnsemblingJobRunner creates a new batch ensembling job runner This service controls the orchestration of batch ensembling jobs.

Types

type CreateEnsemblingJobRequest

type CreateEnsemblingJobRequest struct {
	EnsemblingJob *models.EnsemblingJob
	Labels        map[string]string
	ImageRef      string
	Namespace     string
}

CreateEnsemblingJobRequest is a request to run an ensembling job on Kubernetes.

type EnsemblingController

type EnsemblingController interface {
	Create(request *CreateEnsemblingJobRequest) error
	Delete(namespace string, ensemblingJob *models.EnsemblingJob) error
	GetStatus(namespace string, ensemblingJob *models.EnsemblingJob) (SparkApplicationState, error)
}

EnsemblingController is an interface that exposes the batch ensembling kubernetes controller.

func NewBatchEnsemblingController

func NewBatchEnsemblingController(
	clusterController cluster.Controller,
	mlpService service.MLPService,
	sparkInfraConfig *config.SparkAppConfig,
) EnsemblingController

NewBatchEnsemblingController creates a new batch ensembling controller

type MockEnsemblingController

type MockEnsemblingController struct {
	mock.Mock
}

MockEnsemblingController is an autogenerated mock type for the EnsemblingController type

func (*MockEnsemblingController) Create

Create provides a mock function with given fields: request

func (*MockEnsemblingController) Delete

func (_m *MockEnsemblingController) Delete(namespace string, ensemblingJob *models.EnsemblingJob) error

Delete provides a mock function with given fields: namespace, ensemblingJob

func (*MockEnsemblingController) GetStatus

func (_m *MockEnsemblingController) GetStatus(namespace string, ensemblingJob *models.EnsemblingJob) (SparkApplicationState, error)

GetStatus provides a mock function with given fields: namespace, ensemblingJob

type SparkApplicationState

type SparkApplicationState int

SparkApplicationState is the state of the spark application

Jump to

Keyboard shortcuts

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