AxGEPAComponentSelector Generated TypeScript API reference. typescript api api/reference build/apidocs/Class.AxGEPAComponentSelector.md class AxGEPAComponentSelector

AxGEPAComponentSelector

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/dsp/optimizers/gepaSelection.ts#L10

Constructors

Constructor

TypeScript
new AxGEPAComponentSelector(targets: readonly AxGEPAComponentTarget[], initialState?: Readonly<Record<string, AxGEPAComponentBanditState>>): AxGEPAComponentSelector;

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/dsp/optimizers/gepaSelection.ts#L13

Parameters

ParameterType
targetsreadonly AxGEPAComponentTarget[]
initialState?Readonly<Record<string, AxGEPAComponentBanditState>>

Returns

AxGEPAComponentSelector

Methods

getState()

TypeScript
getState(id: string): 
  | undefined
  | AxGEPAComponentBanditState;

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/dsp/optimizers/gepaSelection.ts#L28

Parameters

ParameterType
idstring

Returns

| undefined | AxGEPAComponentBanditState


pick()

TypeScript
pick(iteration: number, rand: () => number): AxGEPAComponentTarget;

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/dsp/optimizers/gepaSelection.ts#L39

Parameters

ParameterType
iterationnumber
rand() => number

Returns

AxGEPAComponentTarget


recordProposal()

TypeScript
recordProposal(id: string): void;

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/dsp/optimizers/gepaSelection.ts#L78

Parameters

ParameterType
idstring

Returns

void


recordResult()

TypeScript
recordResult(
   id: string, 
   accepted: boolean, 
   iteration: number): void;

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/dsp/optimizers/gepaSelection.ts#L84

Parameters

ParameterType
idstring
acceptedboolean
iterationnumber

Returns

void


snapshot()

TypeScript
snapshot(): Record<string, AxGEPAComponentBanditState>;

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/dsp/optimizers/gepaSelection.ts#L33

Returns

Record<string, AxGEPAComponentBanditState>

Docs