internal

package
v0.0.0-...-3511abf Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2023 License: Apache-2.0 Imports: 144 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MIMEApplicationGZip is GZip's MIME type.
	MIMEApplicationGZip = "application/gzip"
	// MIMEApplicationZip is Zip's MIME type.
	MIMEApplicationZip = "application/zip"
)
View Source
const (
	// InvalidHPKillDelay the delay before we forcibly kill a trial that said it had an invalid HP.
	InvalidHPKillDelay = 10 * time.Second
)

Variables

View Source
var SummaryMetricStatistics = []string{"last", "max", "mean", "min"}

SummaryMetricStatistics lists values possibly queryable within summary metrics.

View Source
var (

	// TrialAvailableSeriesBatchWaitTime is exported to be changed by tests.
	TrialAvailableSeriesBatchWaitTime = 15 * time.Second
)

Functions

func GetModelDefCache

func GetModelDefCache() *cache.FileCache

GetModelDefCache returns FileCache object.

func PopulateExpTrialsMetrics

func PopulateExpTrialsMetrics(pgdb *db.PgDB, masterConfig *config.Config, trivialMetrics bool,
	batches int,
) error

PopulateExpTrialsMetrics adds metrics for a trial and exp to db.

Types

type AllocationMetadata

type AllocationMetadata struct {
	AllocationID     model.AllocationID
	TaskType         model.TaskType
	Username         string
	WorkspaceName    string
	ExperimentID     int
	Slots            int
	StartTime        time.Time
	EndTime          time.Time
	ImagepullingTime float64
	GPUHours         float64
}

AllocationMetadata captures the historic allocation information for a given task.

type ExperimentRequestQuery

type ExperimentRequestQuery struct {
	User   string
	Limit  int
	Offset int
	Filter string
}

ExperimentRequestQuery contains values for the experiments request queries with defaults already applied. This should to be kept in sync with the expected queries from ParseExperimentsQuery.

func ParseExperimentsQuery

func ParseExperimentsQuery(apiCtx echo.Context) (*ExperimentRequestQuery, error)

ParseExperimentsQuery parse queries for the experiments endpoint.

type ExperimentSnapshotShimError

type ExperimentSnapshotShimError struct {
	Message string
}

ExperimentSnapshotShimError describes an error encountered while shimming.

func (ExperimentSnapshotShimError) Error

type LogrusLogFn

type LogrusLogFn func(format string, args ...interface{})

LogrusLogFn is an interface for all the logrus Levelf log functions.

type Master

type Master struct {
	ClusterID string
	MasterID  string
	// contains filtered or unexported fields
}

Master manages the Determined master state.

func New

func New(logStore *logger.LogBuffer, config *config.Config) *Master

New creates an instance of the Determined master.

func (*Master) Info

func (m *Master) Info() aproto.MasterInfo

Info returns this master's information.

func (*Master) Run

func (m *Master) Run(ctx context.Context, gRPCLogInitDone chan struct{}) error

Run causes the Determined master to connect the database and begin listening for HTTP requests.

gRPCLogInitDone is closed when the grpclog package's logger singletons are set. This is just used by tests to soothe -race, since we asynchronously launch a gRPC server and connect with a gRPC client, in the same program, using the same singletons.

type TaskLogBackend

type TaskLogBackend interface {
	TaskLogs(
		taskID model.TaskID, limit int, filters []api.Filter, order apiv1.OrderBy, state interface{},
	) ([]*model.TaskLog, interface{}, error)
	AddTaskLogs([]*model.TaskLog) error
	TaskLogsCount(taskID model.TaskID, filters []api.Filter) (int, error)
	TaskLogsFields(taskID model.TaskID) (*apiv1.TaskLogsFieldsResponse, error)
	DeleteTaskLogs(taskIDs []model.TaskID) error
	// MaxTerminationDelay is the max delay before a consumer can be sure all logs have been
	// recevied. A better interface may be an interface for streaming, rather than helper
	// interfaces to aid streaming, but it's not bad enough to motivate changing it.
	MaxTerminationDelay() time.Duration
}

TaskLogBackend is an interface task log backends, such as elastic or postgres, must support to provide the features surfaced in our API.

type TrialLogBackend

type TrialLogBackend interface {
	TrialLogs(
		trialID, limit int, filters []api.Filter, order apiv1.OrderBy, state interface{},
	) ([]*model.TrialLog, interface{}, error)
	TrialLogsCount(trialID int, filters []api.Filter) (int, error)
	TrialLogsFields(trialID int) (*apiv1.TrialLogsFieldsResponse, error)
	DeleteTrialLogs(trialIDs []int) error
}

TrialLogBackend is an interface trial log backends, such as elastic or postgres, must support to provide the features surfaced in API. This is deprecated, note it no longer supports adding logs in favor of unified logs.

type UnwatchEvents

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

UnwatchEvents is initiated from the get searcher events API. It deletes the watcher with the given ID.

Jump to

Keyboard shortcuts

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