run

package
v0.0.0-...-0888c38 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ResultRow

type ResultRow struct {
	// ExperimentID is a string representation of a UUID.
	ExperimentID string    `bigquery:"experiment_id"`
	Timestamp    time.Time `bigquery:"timestamp"`
	Name         string    `bigquery:"name"`
	Value        float64   `bigquery:"value"`
	// JSON encoded map[string]string of tags.
	Tags string `bigquery:"tags"`
}

ResultRow represents a single datapoint for a single metric, to be stored in bigquery. Each result row is associated to a particular run of an experiment (via ExperimentID).

func MetricsRowToResultRow

func MetricsRowToResultRow(expID uuid.UUID, row *metrics.ResultRow) (*ResultRow, error)

MetricsRowToResultRow converts a `metrics.ResultRow` into a `bq.ResultRow`.

type Runner

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

Runner is responsible for running experiments using the ClusterProvider to get a cluster for the experiment.

func NewRunner

func NewRunner(c cluster.Provider, pxCtx *pixie.Context, resultTable *bq.Table, specTable *bq.Table, containerRegistryRepo string) *Runner

NewRunner creates a new Runner for the given contexts.

func (*Runner) RunExperiment

func (r *Runner) RunExperiment(ctx context.Context, expID uuid.UUID, spec *experimentpb.ExperimentSpec) error

RunExperiment runs an experiment according to the given ExperimentSpec.

type SpecRow

type SpecRow struct {
	// ExperimentID is a string representation of a experiment UUID.
	ExperimentID string `bigquery:"experiment_id"`
	// Spec is a json encoded `experimentpb.ExperimentSpec`
	Spec string `bigquery:"spec"`
	// CommitTopoOrder is the number of commits since the beginning of history for the commit this experiment was run on.
	// This is used to order experiments in datastudio views.
	CommitTopoOrder int `bigquery:"commit_topo_order"`
}

SpecRow stores an experiments ExperimentSpec in bigquery, encoded as JSON. SpecRows are only written to bigquery on experiment success, so all results from failed attempts can be ignored by joining on the ExperimentID

Jump to

Keyboard shortcuts

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