runconfig

package
v0.0.0-...-22a63fd Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Format

type Format int
const (
	FormatYaml Format = iota
	FormatJson
)

type RunConfig

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

The configuration of a run.

This is usually used for hyperparameters and some run metadata like the start time and the ML framework used. In a somewhat hacky way, it is also used to store programmatic custom charts for the run and various other things.

The server process builds this up incrementally throughout a run's lifetime.

func New

func New() *RunConfig

func NewFrom

func NewFrom(tree pathtree.TreeData) *RunConfig

func (*RunConfig) AddTelemetryAndMetrics

func (rc *RunConfig) AddTelemetryAndMetrics(
	telemetry *service.TelemetryRecord,
	metrics []map[int]interface{},
)

Inserts W&B-internal values into the run's configuration.

func (*RunConfig) ApplyChangeRecord

func (rc *RunConfig) ApplyChangeRecord(
	configRecord *service.ConfigRecord,
	onError func(error),
)

Updates and/or removes values from the configuration tree.

Does a best-effort job to apply all changes. Errors are passed to `onError` and skipped.

func (*RunConfig) CloneTree

func (rc *RunConfig) CloneTree() (pathtree.TreeData, error)

func (*RunConfig) MergeResumedConfig

func (rc *RunConfig) MergeResumedConfig(oldConfig pathtree.TreeData) error

Incorporates the config from a run that's being resumed.

func (*RunConfig) Serialize

func (rc *RunConfig) Serialize(format Format) ([]byte, error)

func (*RunConfig) Tree

func (rc *RunConfig) Tree() pathtree.TreeData

Jump to

Keyboard shortcuts

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