experiment

package
v0.750.9-dryrun Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// GlobalProjectID is the project ID for requests that affect applicable experiments across all projects.
	GlobalProjectID = -1
)

Variables

AuthZProvider is the authz registry for experiments.

View Source
var ExperimentRegistry = tasklist.NewRegistry[int, Experiment]()

ExperimentRegistry is a registry of all experiments. It is meant to be used as a replacement for the actor registry. note: this can probably be a sync.map

Functions

func ExperimentCheckpointsToGCRaw

func ExperimentCheckpointsToGCRaw(
	ctx context.Context,
	id int,
	experimentBest, trialBest, trialLatest int,
) ([]uuid.UUID, error)

ExperimentCheckpointsToGCRaw returns a comma-separated string describing checkpoints that should be GCed according to the given GC policy parameters. If the delete parameter is true, the returned checkpoints are also marked as deleted in the database.

func FilterToExperimentIds

func FilterToExperimentIds(ctx context.Context, filters *apiv1.BulkExperimentFilters) ([]int32,
	error,
)

FilterToExperimentIds applies a request's filters to get a list of matching experiment IDs.

func GetExperimentAndCheckCanDoActions

func GetExperimentAndCheckCanDoActions(
	ctx context.Context,
	expID int,
	actions ...func(context.Context, model.User, *model.Experiment) error,
) (*model.Experiment, model.User, error)

GetExperimentAndCheckCanDoActions fetches an experiment and performs auth checks.

func ToAPIResults

func ToAPIResults(results []ExperimentActionResult) []*apiv1.ExperimentActionResult

ToAPIResults converts ExperimentActionResult type with error object to error strings.

Types

type Experiment

type Experiment interface {
	TrialCompleteOperation(msg TrialCompleteOperation) error
	TrialReportProgress(msg TrialReportProgress) error
	TrialGetSearcherState(requestID model.RequestID) (TrialSearcherState, error)
	UserInitiatedEarlyTrialExit(msg UserInitiatedEarlyTrialExit) error
	PatchTrialState(msg PatchTrialState) error
	SetGroupMaxSlots(msg sproto.SetGroupMaxSlots)
	SetGroupWeight(weight float64) error
	SetGroupPriority(priority int) error
	PerformSearcherOperations(msg *apiv1.PostSearcherOperationsRequest) error
	GetSearcherEventsWatcher() (*searcher.EventsWatcher, error)
	UnwatchEvents(id uuid.UUID) error
	ActivateExperiment() error
	PauseExperiment() error
	CancelExperiment() error
	KillExperiment() error
}

Experiment is an interface that represents an experiment.

type ExperimentActionResult

type ExperimentActionResult struct {
	Error error
	ID    int32
}

ExperimentActionResult contains an experiment's ID and associated error.

func ActivateExperiments

func ActivateExperiments(
	ctx context.Context,
	projectID int32,
	experimentIds []int32,
	filters *apiv1.BulkExperimentFilters,
) ([]ExperimentActionResult, error)

ActivateExperiments works on one or many experiments. If filters are provided, experimentIds are ignored.

func ArchiveExperiments

func ArchiveExperiments(
	ctx context.Context,
	projectID int32,
	experimentIds []int32,
	filters *apiv1.BulkExperimentFilters,
) ([]ExperimentActionResult, error)

ArchiveExperiments works on one or many experiments. If filters are provided, experimentIds are ignored.

func BulkUpdateLogRentention added in v0.750.0

func BulkUpdateLogRentention(
	ctx context.Context,
	database db.DB,
	projectID int32,
	expIDs []int32,
	filters *apiv1.BulkExperimentFilters,
	numDays int16,
) ([]ExperimentActionResult, error)

BulkUpdateLogRentention retains logs for the given list of experiments. If filters are provided, experimentIds are ignored.

func CancelExperiments

func CancelExperiments(
	ctx context.Context,
	projectID int32,
	experimentIds []int32,
	filters *apiv1.BulkExperimentFilters,
) ([]ExperimentActionResult, error)

CancelExperiments works on one or many experiments. If filters are provided, experimentIds are ignored.

func DeleteExperiments

func DeleteExperiments(
	ctx context.Context,
	projectID int32,
	experimentIds []int32,
	filters *apiv1.BulkExperimentFilters,
) ([]ExperimentActionResult, []*model.Experiment, error)

DeleteExperiments works on one or many experiments. If filters are provided, experimentIds are ignored.

func KillExperiments

func KillExperiments(
	ctx context.Context,
	projectID int32,
	experimentIds []int32,
	filters *apiv1.BulkExperimentFilters,
) ([]ExperimentActionResult, error)

KillExperiments works on one or many experiments. If filters are provided, experimentIds are ignored.

func MoveExperiments

func MoveExperiments(
	ctx context.Context,
	projectID int32,
	experimentIds []int32,
	filters *apiv1.BulkExperimentFilters,
	destinationProjectID int32,
) ([]ExperimentActionResult, error)

MoveExperiments works on one or many experiments. If filters are provided, experimentIds are ignored.

func PauseExperiments

func PauseExperiments(
	ctx context.Context,
	projectID int32,
	experimentIds []int32,
	filters *apiv1.BulkExperimentFilters,
) ([]ExperimentActionResult, error)

PauseExperiments works on one or many experiments. If filters are provided, experimentIds are ignored.

func UnarchiveExperiments

func UnarchiveExperiments(
	ctx context.Context,
	projectID int32,
	experimentIds []int32,
	filters *apiv1.BulkExperimentFilters,
) ([]ExperimentActionResult, error)

UnarchiveExperiments works on one or many experiments. If filters are provided, experimentIds are ignored.

type ExperimentAuthZ

type ExperimentAuthZ interface {
	// GET /api/v1/experiments/:exp_id
	// GET /tasks
	CanGetExperiment(
		ctx context.Context, curUser model.User, e *model.Experiment,
	) error

	// GET /api/v1/experiments/:exp_id/file_tree
	// POST /api/v1/experiments/{experimentId}/file
	// GET /experiments/:exp_id/file/download
	// GET /api/v1/experiments/:exp_id/model_def
	// GET /experiments/:exp_id/model_def
	// GET /api/v1/experiments/:exp_id/checkpoints
	// GET /experiments/:exp_id/preview_gc
	// GET /api/v1/experiments/:exp_id/validation_history
	// GET /api/v1/experiments/:exp_id/searcher/best_searcher_validation_metric
	// GET /api/v1/experiments/:exp_id/metrics-stream/metric-names
	// GET /api/v1/experiments/:exp_id/metrics-stream/batches
	// GET /api/v1/experiments/:exp_id/metrics-stream/trials-snapshot
	// GET /api/v1/experiments/:exp_id/metrics-stream/trials-sample
	// GET /api/v1/experiments/{experimentId}/hyperparameter-importance
	// GET /api/v1/trials/:trial_id/checkpoints
	// GET /api/v1/experiments/:trial_id/trials
	// GET /api/v1/trials/:trial_id
	// GET /api/v1/trials/:trial_id/summarize
	// GET /api/v1/trials/compare
	// GET /api/v1/trials/:trial_id/workloads
	// GET /api/v1/trials/:trial_id/profiler/metrics
	// GET /api/v1/trials/:trial_id/profiler/available_series
	// GET /api/v1/trials/:trial_id/searcher/operation
	// GET /api/v1/trials/:trial_id/logs
	// GET /api/v1/trials/:trial_id/logs/fields
	// GET /trials/:trial_id
	// GET /trials/:trial_id/metrics
	CanGetExperimentArtifacts(ctx context.Context, curUser model.User, e *model.Experiment) error

	// DELETE /api/v1/experiments/:exp_id
	CanDeleteExperiment(ctx context.Context, curUser model.User, e *model.Experiment) error

	// GET /api/v1/experiments
	// "proj" being nil indicates getting experiments from all projects.
	// WARN: query is expected to expose the "workspace_id" column.
	FilterExperimentsQuery(
		ctx context.Context, curUser model.User, proj *projectv1.Project, query *bun.SelectQuery,
		permissions []rbacv1.PermissionType,
	) (*bun.SelectQuery, error)

	// GET /api/v1/experiments/labels
	// "proj" being nil indicates searching across all projects.
	FilterExperimentLabelsQuery(
		ctx context.Context, curUser model.User, proj *projectv1.Project, query *bun.SelectQuery,
	) (*bun.SelectQuery, error)

	// POST /api/v1/preview-hp-search
	CanPreviewHPSearch(ctx context.Context, curUser model.User) error

	// POST /api/v1/experiments/:exp_id/activate
	// POST /api/v1/experiments
	// POST /api/v1/experiments/:exp_id/pause
	// POST /api/v1/experiments/:exp_id/kill
	// POST /api/v1/experiments/:exp_id/hyperparameter-importance
	// POST /api/v1/experiments/:exp_id/cancel
	// POST /api/v1/trials/:trial_id/kill
	// POST /api/v1/trials/profiler/metrics
	// POST /api/v1/trials/:trial_id/searcher/completed_operation
	// POST /api/v1/trials/:trial_id/early_exit
	// POST /api/v1/trials/:trial_id/progress
	// POST /api/v1/trials/:trial_id/training_metrics
	// POST /api/v1/trials/:trial_id/validation_metrics
	// POST /api/v1/trials/:trial_id/runner/metadata
	// POST /api/v1/allocations/:allocation_id/all_gather
	// POST /api/v1/allocations/:allocation_id/proxy_address
	// POST /api/v1/allocations/:allocation_id/waiting
	CanEditExperiment(ctx context.Context, curUser model.User, e *model.Experiment) error

	// POST /api/v1/experiments/:exp_id/archive
	// POST /api/v1/experiments/:exp_id/unarchive
	// PATCH /api/v1/experiments/:exp_id/
	CanEditExperimentsMetadata(ctx context.Context, curUser model.User, e *model.Experiment) error

	// POST /api/v1/experiments
	CanCreateExperiment(
		ctx context.Context, curUser model.User, proj *projectv1.Project,
	) error
	CanForkFromExperiment(ctx context.Context, curUser model.User, e *model.Experiment) error

	// PATCH /experiments/:exp_id
	CanSetExperimentsMaxSlots(
		ctx context.Context, curUser model.User, e *model.Experiment, slots int,
	) error
	CanSetExperimentsWeight(
		ctx context.Context, curUser model.User, e *model.Experiment, weight float64,
	) error
	CanSetExperimentsPriority(
		ctx context.Context, curUser model.User, e *model.Experiment, priority int,
	) error
	CanSetExperimentsCheckpointGCPolicy(
		ctx context.Context, curUser model.User, e *model.Experiment,
	) error

	// GET /api/v1/experiments/:exp_id/searcher_events
	// POST /api/v1/experiments/:exp_id/searcher_operations
	CanRunCustomSearch(ctx context.Context, curUser model.User, e *model.Experiment) error
}

ExperimentAuthZ describes authz methods for experiments.

type ExperimentAuthZBasic

type ExperimentAuthZBasic struct{}

ExperimentAuthZBasic is basic OSS controls.

func (*ExperimentAuthZBasic) CanCreateExperiment

func (a *ExperimentAuthZBasic) CanCreateExperiment(
	ctx context.Context, curUser model.User, proj *projectv1.Project,
) error

CanCreateExperiment always returns a nil error.

func (*ExperimentAuthZBasic) CanDeleteExperiment

func (a *ExperimentAuthZBasic) CanDeleteExperiment(
	ctx context.Context, curUser model.User, e *model.Experiment,
) error

CanDeleteExperiment returns an error if the experiment is not owned by the current user and the current user is not an admin.

func (*ExperimentAuthZBasic) CanEditExperiment

func (a *ExperimentAuthZBasic) CanEditExperiment(
	ctx context.Context, curUser model.User, e *model.Experiment,
) error

CanEditExperiment always returns a nil error.

func (*ExperimentAuthZBasic) CanEditExperimentsMetadata

func (a *ExperimentAuthZBasic) CanEditExperimentsMetadata(
	ctx context.Context, curUser model.User, e *model.Experiment,
) error

CanEditExperimentsMetadata always returns a nil error.

func (*ExperimentAuthZBasic) CanForkFromExperiment

func (a *ExperimentAuthZBasic) CanForkFromExperiment(
	ctx context.Context, curUser model.User, e *model.Experiment,
) error

CanForkFromExperiment always returns a nil error.

func (*ExperimentAuthZBasic) CanGetExperiment

func (a *ExperimentAuthZBasic) CanGetExperiment(
	ctx context.Context, curUser model.User, e *model.Experiment,
) error

CanGetExperiment always returns true and a nil error.

func (*ExperimentAuthZBasic) CanGetExperimentArtifacts

func (a *ExperimentAuthZBasic) CanGetExperimentArtifacts(
	ctx context.Context, curUser model.User, e *model.Experiment,
) error

CanGetExperimentArtifacts always returns a nil error.

func (*ExperimentAuthZBasic) CanPreviewHPSearch

func (a *ExperimentAuthZBasic) CanPreviewHPSearch(
	ctx context.Context, curUser model.User,
) error

CanPreviewHPSearch always returns a nil error.

func (*ExperimentAuthZBasic) CanRunCustomSearch added in v0.750.0

func (a *ExperimentAuthZBasic) CanRunCustomSearch(
	ctx context.Context, curUser model.User, e *model.Experiment,
) error

CanRunCustomSearch always returns a nil error.

func (*ExperimentAuthZBasic) CanSetExperimentsCheckpointGCPolicy

func (a *ExperimentAuthZBasic) CanSetExperimentsCheckpointGCPolicy(
	ctx context.Context, curUser model.User, e *model.Experiment,
) error

CanSetExperimentsCheckpointGCPolicy always returns a nil error.

func (*ExperimentAuthZBasic) CanSetExperimentsMaxSlots

func (a *ExperimentAuthZBasic) CanSetExperimentsMaxSlots(
	ctx context.Context, curUser model.User, e *model.Experiment, slots int,
) error

CanSetExperimentsMaxSlots always returns a nil error.

func (*ExperimentAuthZBasic) CanSetExperimentsPriority

func (a *ExperimentAuthZBasic) CanSetExperimentsPriority(
	ctx context.Context, curUser model.User, e *model.Experiment, priority int,
) error

CanSetExperimentsPriority always returns a nil error.

func (*ExperimentAuthZBasic) CanSetExperimentsWeight

func (a *ExperimentAuthZBasic) CanSetExperimentsWeight(
	ctx context.Context, curUser model.User, e *model.Experiment, weight float64,
) error

CanSetExperimentsWeight always returns a nil error.

func (*ExperimentAuthZBasic) FilterExperimentLabelsQuery

func (a *ExperimentAuthZBasic) FilterExperimentLabelsQuery(
	ctx context.Context, curUser model.User, proj *projectv1.Project, query *bun.SelectQuery,
) (*bun.SelectQuery, error)

FilterExperimentLabelsQuery returns the query unmodified and a nil error.

func (*ExperimentAuthZBasic) FilterExperimentsQuery

func (a *ExperimentAuthZBasic) FilterExperimentsQuery(
	ctx context.Context, curUser model.User, proj *projectv1.Project, query *bun.SelectQuery,
	permissions []rbacv1.PermissionType,
) (*bun.SelectQuery, error)

FilterExperimentsQuery returns the query unmodified and a nil error.

type ExperimentAuthZPermissive

type ExperimentAuthZPermissive struct{}

ExperimentAuthZPermissive is the permission implementation.

func (*ExperimentAuthZPermissive) CanCreateExperiment

func (p *ExperimentAuthZPermissive) CanCreateExperiment(
	ctx context.Context, curUser model.User, proj *projectv1.Project,
) error

CanCreateExperiment calls RBAC authz but enforces basic authz.

func (*ExperimentAuthZPermissive) CanDeleteExperiment

func (p *ExperimentAuthZPermissive) CanDeleteExperiment(
	ctx context.Context, curUser model.User, e *model.Experiment,
) error

CanDeleteExperiment calls RBAC authz but enforces basic authz.

func (*ExperimentAuthZPermissive) CanEditExperiment

func (p *ExperimentAuthZPermissive) CanEditExperiment(
	ctx context.Context, curUser model.User, e *model.Experiment,
) error

CanEditExperiment calls RBAC authz but enforces basic authz.

func (*ExperimentAuthZPermissive) CanEditExperimentsMetadata

func (p *ExperimentAuthZPermissive) CanEditExperimentsMetadata(
	ctx context.Context, curUser model.User, e *model.Experiment,
) error

CanEditExperimentsMetadata calls RBAC authz but enforces basic authz.

func (*ExperimentAuthZPermissive) CanForkFromExperiment

func (p *ExperimentAuthZPermissive) CanForkFromExperiment(
	ctx context.Context, curUser model.User, e *model.Experiment,
) error

CanForkFromExperiment calls RBAC authz but enforces basic authz.

func (*ExperimentAuthZPermissive) CanGetExperiment

func (p *ExperimentAuthZPermissive) CanGetExperiment(
	ctx context.Context, curUser model.User, e *model.Experiment,
) error

CanGetExperiment calls RBAC authz but enforces basic authz.

func (*ExperimentAuthZPermissive) CanGetExperimentArtifacts

func (p *ExperimentAuthZPermissive) CanGetExperimentArtifacts(
	ctx context.Context, curUser model.User, e *model.Experiment,
) error

CanGetExperimentArtifacts calls RBAC authz but enforces basic authz.

func (*ExperimentAuthZPermissive) CanPreviewHPSearch

func (p *ExperimentAuthZPermissive) CanPreviewHPSearch(
	ctx context.Context, curUser model.User,
) error

CanPreviewHPSearch calls RBAC authz but enforces basic authz.

func (*ExperimentAuthZPermissive) CanRunCustomSearch added in v0.750.0

func (p *ExperimentAuthZPermissive) CanRunCustomSearch(
	ctx context.Context, curUser model.User, e *model.Experiment,
) error

CanRunCustomSearch calls RBAC authz but enforces basic authz.

func (*ExperimentAuthZPermissive) CanSetExperimentsCheckpointGCPolicy

func (p *ExperimentAuthZPermissive) CanSetExperimentsCheckpointGCPolicy(
	ctx context.Context, curUser model.User, e *model.Experiment,
) error

CanSetExperimentsCheckpointGCPolicy calls RBAC authz but enforces basic authz.

func (*ExperimentAuthZPermissive) CanSetExperimentsMaxSlots

func (p *ExperimentAuthZPermissive) CanSetExperimentsMaxSlots(
	ctx context.Context, curUser model.User, e *model.Experiment, slots int,
) error

CanSetExperimentsMaxSlots calls RBAC authz but enforces basic authz.

func (*ExperimentAuthZPermissive) CanSetExperimentsPriority

func (p *ExperimentAuthZPermissive) CanSetExperimentsPriority(
	ctx context.Context, curUser model.User, e *model.Experiment, priority int,
) error

CanSetExperimentsPriority calls RBAC authz but enforces basic authz.

func (*ExperimentAuthZPermissive) CanSetExperimentsWeight

func (p *ExperimentAuthZPermissive) CanSetExperimentsWeight(
	ctx context.Context, curUser model.User, e *model.Experiment, weight float64,
) error

CanSetExperimentsWeight calls RBAC authz but enforces basic authz.

func (*ExperimentAuthZPermissive) FilterExperimentLabelsQuery

func (p *ExperimentAuthZPermissive) FilterExperimentLabelsQuery(
	ctx context.Context, curUser model.User, proj *projectv1.Project,
	query *bun.SelectQuery,
) (*bun.SelectQuery, error)

FilterExperimentLabelsQuery calls RBAC authz but enforces basic authz.

func (*ExperimentAuthZPermissive) FilterExperimentsQuery

func (p *ExperimentAuthZPermissive) FilterExperimentsQuery(
	ctx context.Context, curUser model.User, proj *projectv1.Project,
	query *bun.SelectQuery, permissions []rbacv1.PermissionType,
) (*bun.SelectQuery, error)

FilterExperimentsQuery calls RBAC authz but enforces basic authz.

type ExperimentAuthZRBAC

type ExperimentAuthZRBAC struct{}

ExperimentAuthZRBAC is RBAC enabled controls.

func (*ExperimentAuthZRBAC) CanCreateExperiment

func (a *ExperimentAuthZRBAC) CanCreateExperiment(
	ctx context.Context, curUser model.User, proj *projectv1.Project,
) (err error)

CanCreateExperiment checks if a user can create an experiment.

func (*ExperimentAuthZRBAC) CanDeleteExperiment

func (a *ExperimentAuthZRBAC) CanDeleteExperiment(
	ctx context.Context, curUser model.User, e *model.Experiment,
) (err error)

CanDeleteExperiment checks if a user has permission to delete an experiment.

func (*ExperimentAuthZRBAC) CanEditExperiment

func (a *ExperimentAuthZRBAC) CanEditExperiment(
	ctx context.Context, curUser model.User, e *model.Experiment,
) (err error)

CanEditExperiment checks if a user can edit an experiment.

func (*ExperimentAuthZRBAC) CanEditExperimentsMetadata

func (a *ExperimentAuthZRBAC) CanEditExperimentsMetadata(
	ctx context.Context, curUser model.User, e *model.Experiment,
) (err error)

CanEditExperimentsMetadata checks if a user can edit an experiment's metadata.

func (*ExperimentAuthZRBAC) CanForkFromExperiment

func (a *ExperimentAuthZRBAC) CanForkFromExperiment(
	ctx context.Context, curUser model.User, e *model.Experiment,
) (err error)

CanForkFromExperiment checks if a user can create an experiment.

func (*ExperimentAuthZRBAC) CanGetExperiment

func (a *ExperimentAuthZRBAC) CanGetExperiment(
	ctx context.Context, curUser model.User, e *model.Experiment,
) (err error)

CanGetExperiment checks if a user has permission to view an experiment.

func (*ExperimentAuthZRBAC) CanGetExperimentArtifacts

func (a *ExperimentAuthZRBAC) CanGetExperimentArtifacts(
	ctx context.Context, curUser model.User, e *model.Experiment,
) (err error)

CanGetExperimentArtifacts checks if a user has permission to view experiment artifacts.

func (*ExperimentAuthZRBAC) CanPreviewHPSearch

func (a *ExperimentAuthZRBAC) CanPreviewHPSearch(ctx context.Context, curUser model.User,
) (err error)

CanPreviewHPSearch always returns a nil error.

func (*ExperimentAuthZRBAC) CanRunCustomSearch added in v0.750.0

func (a *ExperimentAuthZRBAC) CanRunCustomSearch(
	ctx context.Context, curUser model.User, e *model.Experiment,
) error

CanRunCustomSearch checks if a user has permission to run customer search.

func (*ExperimentAuthZRBAC) CanSetExperimentsCheckpointGCPolicy

func (a *ExperimentAuthZRBAC) CanSetExperimentsCheckpointGCPolicy(
	ctx context.Context, curUser model.User, e *model.Experiment,
) error

CanSetExperimentsCheckpointGCPolicy checks if a user can update the checkpoint gc policy.

func (*ExperimentAuthZRBAC) CanSetExperimentsMaxSlots

func (a *ExperimentAuthZRBAC) CanSetExperimentsMaxSlots(
	ctx context.Context, curUser model.User, e *model.Experiment, slots int,
) error

CanSetExperimentsMaxSlots checks if a user can update an experiment's max slots.

func (*ExperimentAuthZRBAC) CanSetExperimentsPriority

func (a *ExperimentAuthZRBAC) CanSetExperimentsPriority(
	ctx context.Context, curUser model.User, e *model.Experiment, priority int,
) error

CanSetExperimentsPriority checks if a user can update an experiment's priority.

func (*ExperimentAuthZRBAC) CanSetExperimentsWeight

func (a *ExperimentAuthZRBAC) CanSetExperimentsWeight(
	ctx context.Context, curUser model.User, e *model.Experiment, weight float64,
) error

CanSetExperimentsWeight checks if a user can update an experiment's weight.

func (*ExperimentAuthZRBAC) FilterExperimentLabelsQuery

func (a *ExperimentAuthZRBAC) FilterExperimentLabelsQuery(
	ctx context.Context, curUser model.User, proj *projectv1.Project, query *bun.SelectQuery,
) (selectQuery *bun.SelectQuery, err error)

FilterExperimentLabelsQuery filters a query for what experiment metadata a user can view.

func (*ExperimentAuthZRBAC) FilterExperimentsQuery

func (a *ExperimentAuthZRBAC) FilterExperimentsQuery(
	ctx context.Context, curUser model.User, proj *projectv1.Project, query *bun.SelectQuery,
	permissions []rbacv1.PermissionType,
) (selectQuery *bun.SelectQuery, err error)

FilterExperimentsQuery filters a query for what experiments a user can view.

type PatchTrialState

type PatchTrialState struct {
	RequestID model.RequestID
	State     model.StateWithReason
}

PatchTrialState is a message sent to an experiment to indicate that a trial has changed state.

type TrialCompleteOperation added in v0.750.0

type TrialCompleteOperation struct {
	RequestID model.RequestID
	Op        searcher.ValidateAfter
	Metric    interface{}
}

TrialCompleteOperation is a message sent to an experiment to indicate that a trial has completed an operation.

type TrialReportProgress

type TrialReportProgress struct {
	RequestID model.RequestID
	Progress  searcher.PartialUnits
}

TrialReportProgress is a message sent to an experiment to indicate that a trial has reported progress.

type TrialSearcherState

type TrialSearcherState struct {
	Create   searcher.Create
	Op       searcher.ValidateAfter
	Complete bool
	Closed   bool
}

TrialSearcherState is a message sent to an experiment to indicate that a trial has changed searcher state.

type UserInitiatedEarlyTrialExit

type UserInitiatedEarlyTrialExit struct {
	RequestID model.RequestID
	Reason    model.ExitedReason
}

UserInitiatedEarlyTrialExit is a user-injected message, provided through the early exit API. It _should_ indicate the user is exiting, but in the event they don't, we will clean them up.

Jump to

Keyboard shortcuts

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