Skip to content

Commit ede3b1d

Browse files
authored
Allow running concurrent unit evals (#42578)
Right now only one unit eval GitHub Action can be run at a time. This permits them to run concurrently. Release Notes: - N/A
1 parent b0700a4 commit ede3b1d

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

.github/workflows/run_unit_evals.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,5 +65,5 @@ jobs:
6565
rm -rf ./../.cargo
6666
shell: bash -euxo pipefail {0}
6767
concurrency:
68-
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.ref_name == 'main' && github.sha || 'anysha' }}
68+
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.run_id }}
6969
cancel-in-progress: true

tooling/xtask/src/tasks/workflows/run_agent_evals.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ pub(crate) fn run_unit_evals() -> Workflow {
4141
.add_input(model_name.name, model_name.input())
4242
.add_input(commit_sha.name, commit_sha.input()),
4343
))
44-
.concurrency(vars::one_workflow_per_non_main_branch())
44+
.concurrency(vars::allow_concurrent_runs())
4545
.add_env(("CARGO_TERM_COLOR", "always"))
4646
.add_env(("CARGO_INCREMENTAL", 0))
4747
.add_env(("RUST_BACKTRACE", 1))

tooling/xtask/src/tasks/workflows/vars.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,12 @@ pub(crate) fn one_workflow_per_non_main_branch() -> Concurrency {
8181
.cancel_in_progress(true)
8282
}
8383

84+
pub(crate) fn allow_concurrent_runs() -> Concurrency {
85+
Concurrency::default()
86+
.group("${{ github.workflow }}-${{ github.ref_name }}-${{ github.run_id }}")
87+
.cancel_in_progress(true)
88+
}
89+
8490
// Represents a pattern to check for changed files and corresponding output variable
8591
pub(crate) struct PathCondition {
8692
pub name: &'static str,

0 commit comments

Comments
 (0)