ProgramArtifactStoreOptions

Options & Configuration · AiDotNet.Configuration

Limits and retention rules applied to stored evaluation artifacts.

For Beginners

These settings decide how much of what your candidate programs print is kept, and for how long. Small outputs go in one shared index file; anything over InlineSizeThresholdBytes gets its own file. Anything older than RetentionPeriod is deleted the next time you ask the store to tidy up. The defaults are sensible; raise the caps if you are capturing large traces on purpose, and lower them if disk space matters more than detail.

How It Works

The two defaults that matter are taken from the reference OpenEvolve database configuration (openevolve/config.py): InlineSizeThresholdBytes is upstream’s artifact_size_threshold of 32 KB, the point at which an artifact stops being serialized into the program record and gets a file of its own, and RetentionPeriod is upstream’s artifact_retention_days of 30. Keeping the numbers identical means a run ported from a Python configuration splits and expires its artifacts at the same points.

The remaining settings are bounds upstream does not enforce. Artifact content is produced by code a model wrote against data the library did not choose, so a single evaluation can hand over a gigabyte of standard error or ten thousand named outputs. MaxArtifactBytes caps one artifact, MaxArtifactsPerGenome caps how many a genome may accumulate, and MaxTotalBytesPerGenome caps their combined size. Exceeding the byte caps truncates and flags rather than failing, so a noisy program is recorded honestly instead of aborting a run; exceeding the count cap is rejected, because that is a contract error rather than noise.

Constructors

Constructor Summary
ProgramArtifactStoreOptions()

Properties

Property Summary
TimeSpan RetentionPeriod { get; set; } Gets or sets how long artifacts are retained.
int InlineSizeThresholdBytes { get; set; } Gets or sets the size at or below which an artifact is stored inline.
int MaxArtifactBytes { get; set; } Gets or sets the largest content kept for one artifact, in bytes.
int MaxArtifactsPerGenome { get; set; } Gets or sets how many artifacts one genome may accumulate.
int MaxRetainedGenomes { get; set; } Gets or sets how many genomes keep artifacts, oldest evicted first.
int PurgeEveryStores { get; set; } Gets or sets how many stored evaluations pass between retention sweeps.
long MaxTotalBytesPerGenome { get; set; } Gets or sets the combined size of one genome’s artifacts, in bytes.

Methods

Method Summary
ProgramArtifactStoreOptions Clone() Creates an independent copy so a running store is unaffected by later mutation.
void Validate() Rejects limits that cannot be enforced or that describe an unusable store.

Fields

Field Summary
int DefaultInlineSizeThresholdBytes The reference implementation’s artifact_size_threshold, 32 KB.
int DefaultPurgeEveryStores How many stored evaluations pass between retention sweeps unless another cadence is configured.
int DefaultRetentionDays The reference implementation’s artifact_retention_days, 30 days.
int MaxInlineSizeThresholdBytes The largest inline threshold accepted by Validate, in bytes.