Repository navigation
klaud: autosweep AgentX only #4376
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,6 +19,13 @@ | |
| if TYPE_CHECKING: | ||
| from infx.matrix.revision import Revision | ||
|
|
||
| # Klaud autosweeps cover only AgentX; fixed-seq-len points are out of scope. | ||
| SCENARIO = "agentic-coding" | ||
|
|
||
|
|
||
| def in_scope(entry: dict) -> bool: | ||
| return entry.get("scenario-type") == SCENARIO | ||
|
|
||
|
|
||
| def benchmark_entries(matrix: dict) -> list[dict]: | ||
| return [ | ||
|
|
@@ -44,7 +51,7 @@ def project_prefix(repository: str, head: str) -> str: | |
|
|
||
|
|
||
| def canonical_matrix(repository: str, head: str, family: str) -> dict: | ||
| """Generate the unfiltered family from exact-head YAML using trusted local code. | ||
| """Generate the family's AgentX points from exact-head YAML using trusted local code. | ||
|
|
||
| Candidate source is data only. A future generator-policy change can require manual | ||
| inspection of an older run; it cannot silently waive points or required evals. | ||
|
|
@@ -77,12 +84,16 @@ def canonical_matrix(repository: str, head: str, family: str) -> dict: | |
| for path in [*paths, *blocks]: | ||
| (root / path).parent.mkdir(parents=True, exist_ok=True) | ||
| (root / path).write_bytes(github.file_at(repository, head, prefix + path)) | ||
| entries = generate_test_config_sweep( | ||
| SimpleNamespace(config_keys=[key]), | ||
| validate_master_config(family_config, root), | ||
| validate_runner_config(runners), | ||
| root, | ||
| ) | ||
| entries = [ | ||
| entry | ||
| for entry in generate_test_config_sweep( | ||
| SimpleNamespace(config_keys=[key]), | ||
| validate_master_config(family_config, root), | ||
| validate_runner_config(runners), | ||
| root, | ||
| ) | ||
| if in_scope(entry) | ||
| ] | ||
| fingerprinted = [ | ||
| {**row, "recipe-fingerprint": recipe_fingerprint(row, root)} for row in entries | ||
| ] | ||
|
|
@@ -133,6 +144,7 @@ def producer_matrix(repository: str, head: str, family: str) -> dict: | |
| rows = throughput_rows(producer, family.split(":", 1)[1]) | ||
| if not isinstance(rows, list) or not all(isinstance(row, dict) for row in rows): | ||
| raise ValueError("the generator did not print a list of matrix rows") | ||
| rows = [row for row in rows if in_scope(row)] | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟣 pre-existing, not blocking: An AgentX candidate can be deferred every wave because a same-date fixed-seq-len producer run fails to regenerate, even though those rows are now out of scope. Why this was flaggedThis needs the source date's feed to hold fixed-seq-len rows for the same model/hardware/framework/precision/spec/disagg/image. Those rows must come from a different head whose Verification: |
||
| fingerprints = producer.fingerprints(rows) | ||
| except subprocess.SubprocessError as error: | ||
| stderr = getattr(error, "stderr", None) or b"" | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔴 In-flight Klaud candidates for fixed-seq-len families can no longer pass final validation. They burn resume sessions and then end as "unexpected-error". On the base branch they would validate.
canonical_matrixnow drops every non-AgentX point, so a pure 8k1k family regenerates to an empty canonical set.check_matrixthen raises "Final matrix omits or changes canonical benchmark points". The PR notes this as possible, but the retry loop makes it costlier than a single failure. Fix: classify such a candidate as out of scope once, either with a terminal outcome or by applying the new scope only to new selections, so it is not resumed repeatedly.Why this was flagged
The trigger is any Klaud candidate created before this merge whose family has only fixed-seq-len points. Real configs keep agentic and 8k1k curves in separate families, for example
qwen3.5-fp8-b200-sglangin nvidia-master.yaml:1125. For such a family, the filter at validation.py:87-96 leavesentriesempty.check_matrix(validation.py:223) then raises VerificationError becauseexpectedis empty, andresolve_baseline(reporting.py:1214) raises "Baseline source image no longer matches the selected base". In lifecycle.py:819-832 the VerificationError setsvalidated = False. The cleanup path then callsresumeand raises PendingCleanup untilMAX_SESSIONSis reached. After that it finishes with outcome "unexpected-error", so each affected PR consumes repeated sessions before it is abandoned. On the base branch the same final sweep would pass validation and be marked "validated". The PR description says in-flight 8k1k PRs "may fail final checking", but nothing gives them a clean terminal outcome.Verification: validation.py:87-96 now filters through
in_scope(validation.py:26-27). For a pure 8k1k family,expectedis empty, so line 223 raises "Final matrix omits or changes canonical benchmark points". lifecycle.py:825-834 resumes until MAX_SESSIONS, then ends withoutcome="unexpected-error". On the base branch the unfiltered canonical matrix would have validated it.