ProgramRunOutputOptions
Options & Configuration · AiDotNet.Configuration
Names the directories and files a run writes its best program into.
For Beginners
These settings decide where the winning program is saved and what the files are
called. Leave them alone unless you already have tooling that expects different names. Turn
WriteAtCheckpoints off if you only want the final answer and not a copy at every checkpoint.
How It Works
The defaults reproduce the reference OpenEvolve output layout
(openevolve/controller.py``_save_checkpoint and _save_best_program): a checkpoint snapshot
lands in checkpoints/checkpoint_<n>/ and the final answer in best/, each holding
best_program with the source file’s own extension plus best_program_info.json. A run ported from a
Python configuration therefore leaves an output tree that existing tooling can read unchanged.
MaxSourceBytes has no upstream counterpart and exists because the program text is model-generated:
upstream writes whatever the model produced straight to disk, whereas a bounded write records the truncation in
the info document instead of letting one runaway response fill a volume.
Constructors
| Constructor | Summary |
|---|---|
ProgramRunOutputOptions() |
Properties
| Property | Summary |
|---|---|
bool WriteAtCheckpoints { get; set; } |
Gets or sets whether a snapshot is written at every checkpoint. |
bool WriteAtRunEnd { get; set; } |
Gets or sets whether the final answer is written when the run stops. |
bool WriteEveryProgram { get; set; } |
Gets or sets whether every completed candidate is written, not only the best. |
int MaxSourceBytes { get; set; } |
Gets or sets the largest program written, in UTF-8 bytes. |
long MaxRetainedPrograms { get; set; } |
Gets or sets how many per-program files may be written; zero, the default, means no limit. |
string BestDirectoryName { get; set; } |
Gets or sets the directory holding the run’s final answer. |
string CheckpointDirectoryPrefix { get; set; } |
Gets or sets the prefix of one checkpoint’s directory. |
string CheckpointsDirectoryName { get; set; } |
Gets or sets the directory holding per-checkpoint snapshots. |
string InfoFileName { get; set; } |
Gets or sets the info document’s file name. |
string ProgramFileNameStem { get; set; } |
Gets or sets the program file name without its extension. |
string ProgramsDirectoryName { get; set; } |
Gets or sets the directory holding one file per evaluated program. |
string RunId { get; set; } |
Gets or sets an optional run identifier recorded in the info document. |
Methods
| Method | Summary |
|---|---|
ProgramRunOutputOptions Clone() |
Creates an independent copy so a running writer is unaffected by later mutation. |
void Validate() |
Rejects names that are not usable file-system names and sizes that cannot be enforced. |
Fields
| Field | Summary |
|---|---|
int MaxAllowedSourceBytes |
The largest source size accepted by Validate, in bytes. |