Agent Eval: Initial support for running examples repeatedly (#28844)

Not ideal as it creates a separate worktree for each repetition

Release Notes:

- N/A
This commit is contained in:
Michael Sloan 2025-04-16 00:35:55 -06:00 committed by GitHub
parent 609895d95f
commit 9a9f2e71ca
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 25 additions and 10 deletions

View file

@ -94,11 +94,7 @@ impl Example {
let base_path = dir_path.join("base.toml");
let prompt_path = dir_path.join("prompt.md");
let criteria_path = dir_path.join("criteria.md");
let output_file_path = run_dir.join(format!(
"{}.md",
dir_path.file_name().unwrap().to_str().unwrap()
));
let output_file_path = run_dir.join(format!("{}.md", name));
Ok(Example {
name: name.clone(),
@ -112,6 +108,13 @@ impl Example {
})
}
pub fn set_repetition_number(&mut self, repetition_number: u32) {
if repetition_number > 0 {
self.name = format!("{}-{}", self.name, repetition_number);
self.output_file_path = self.run_dir.join(format!("{}.md", self.name));
}
}
pub fn set_log_prefix_style(&mut self, color: &str, name_width: usize) {
self.log_prefix = format!(
"{}{:<width$}\x1b[0m | ",