Parallelize model evaluation via GitHub Actions matrix to avoid 3h timeout - #1
Merged
Merged
Conversation
Co-authored-by: irony <395843+irony@users.noreply.github.com>
Copilot
AI
changed the title
Parallellisera modellutvärdering med GitHub Actions matrix
Parallelize model evaluation via GitHub Actions matrix to avoid 3h timeout
Aug 7, 2026
Copilot created this pull request from a session on behalf of
irony
August 7, 2026 18:13
View session
irony
marked this pull request as ready for review
August 7, 2026 20:12
There was a problem hiding this comment.
Pull request overview
This PR restructures the weekly model evaluation workflow to run per-model evaluations in parallel (via a GitHub Actions matrix) to avoid hitting the prior ~3h single-job timeout limit.
Changes:
- Adds a
setupjob that builds a dynamic matrix of models and a shared output directory/tag for the run. - Converts evaluation to a matrix
evaljob (one job per model) withfail-fast: false, uploading per-model artifacts. - Adds a
finalizejob to merge artifacts, run judging + summarization, and commit/upload consolidated results.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
.github/workflows/weekly-eval.yml |
Splits the workflow into setup → matrix eval → finalize, with artifact fan-out/fan-in. |
scripts/list_models.py |
New helper to fetch/filter models from the API and emit {"include":[...]} matrix JSON. |
Suppressed comments (1)
scripts/list_models.py:25
Authorization-headern använder en hårdkodad placeholder ("******") istället förOPENAI_API_KEY. Då kommer modell-listningen att ge 401/403 mot API:t och setup-jobbet kan inte bygga matrisen.
req = urllib.request.Request(
f"{API_BASE}/models",
headers={"Authorization": f"******"},
)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+15
to
+16
| API_BASE = os.environ.get("OPENAI_API_BASE", "https://api.example.org/v1") | ||
| API_KEY = os.environ.get("OPENAI_API_KEY", "") |
Comment on lines
+47
to
+51
| TAG="${{ github.event.inputs.tag || 'weekly' }}" | ||
| TIMESTAMP=$(date -u +"%Y-%m-%dT%H-%M-%S") | ||
| OUT_DIR="data/results/${TIMESTAMP}-${TAG}" | ||
| echo "out_dir=$OUT_DIR" >> "$GITHUB_OUTPUT" | ||
| echo "tag=$TAG" >> "$GITHUB_OUTPUT" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The weekly eval workflow ran all models sequentially in a single job, consistently hitting GitHub Actions' 3-hour limit.
Changes
.github/workflows/weekly-eval.yml— split into three dependent jobs:setup: fetches model list from API, outputs a JSON matrix and a sharedout_dirtimestampeval(matrix,fail-fast: false): one parallel job per model, each with a 120-min timeout — models no longer block each otherfinalize: downloads all model artifacts, merges them, runsjudge_sleeper+summarize_eval, commits and uploads final resultsscripts/list_models.py— new helper that fetches/filters the model list and prints the{"include": [...]}matrix JSON consumed by the setup jobIndividual model failures no longer abort the entire run.