Campaign#

Read a campaign config, run the research loop, and read its records. See The campaign config for the config’s sections.

Running a campaign#

factor_agent.campaign.Campaign

Run a mining campaign from its config.

factor_agent.campaign.CampaignResult

Every trial record of the run, why it stopped, and where the ledger is.

factor_agent.campaign.Stop

Why the campaign stopped: by is "max_rounds", "max_trials", "patience" or "provider_quota".

factor_agent.preflight.CheckReport

Every Check of a campaign, in order; the run can start when problems is empty.

factor_agent.preflight.Check

One part of a campaign checked: its name, its problems and warnings, or why it was skipped.

factor_agent.cli.main

Run the factor-agent console script; return its exit status.

Configuration#

factor_agent.config.CampaignConfig

Every setting of a campaign, read from one YAML file with from_file.

factor_agent.config.DataConfig

The data the Evaluator reads.

factor_agent.config.ScoringConfig

How a factor's raw values become the values that are judged (factor_agent.scoring).

factor_agent.config.NeutralizeConfig

What ranked factors are neutralised against.

factor_agent.config.EvaluatorConfig

How the Evaluator computes the round's graph.

factor_agent.config.GateConfig

The Gate's sandbox limits and graph constraints.

factor_agent.config.AdmissionConfig

What an evaluated candidate needs to be accepted.

factor_agent.config.RoundConfig

The size of a round, the planner's quotas and when the campaign stops.

factor_agent.config.ContextConfig

What the prompt context holds; the run snapshot records it at the first start, and a resume may not change it.

factor_agent.config.AcceptanceConfig

How Acceptance validates, opens the hold-out and exports.

factor_agent.config.RoleConfig

One role's LLM: the backend name, the model and the backend's own settings.

factor_agent.config.Mechanism

A mechanism type a candidate's hypothesis belongs to, with the line the prompts describe it by.

Records and run state#

factor_agent.ledger.Ledger

Append and read the trial records of a run directory.

factor_agent.ledger.TrialRecord

One candidate's outcome.

factor_agent.events.Events

The events file of one run directory, appended to by a campaign; safe to use from several threads.

factor_agent.events.read

The events in the file at path, in order; an empty list when there is none.

factor_agent.snapshot.RunSnapshot

The snapshot of a run directory; build it with open or read.

factor_agent.snapshot.SnapshotMismatch

A resume was given files that differ from the run's snapshot.

factor_agent.snapshot.CodeVersionChanged

A resume runs other code than the run was last opened with.

factor_agent.segments.Segments

The training, confirmation, validation and hold-out segments, in that order, and the purge between them.

factor_agent.segments.Segment

A named, inclusive date range.

factor_agent.prompts.Templates

The templates of a campaign: the built-in ones, any of them replaced from a file.

factor_agent.prompts.PromptError

Replaced templates are wrong; the message lists every problem.