feat(agentx): support cross-GPU reference comparisons - #1484
Conversation
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Align the AgentX comparison implementation with the current main branch. Co-Authored-By: Claude <noreply@anthropic.com>
|
|
||
|
|
||
| def test_agentx_analysis_joins_p90_before_selecting_one_real_reference(tmp_path, monkeypatch): | ||
| import hyperloom.inference_optimizer.baseline_comparison.target_analyzer as ta |
|
|
||
| @pytest.mark.parametrize("derived", [{"1": None}, {}, None]) | ||
| def test_agentx_analysis_preserves_total_when_p90_is_unavailable(tmp_path, monkeypatch, derived): | ||
| import hyperloom.inference_optimizer.baseline_comparison.target_analyzer as ta |
|
|
||
|
|
||
| def test_agentx_p90_selection_is_stable_and_never_prefers_missing_metric(tmp_path, monkeypatch): | ||
| import hyperloom.inference_optimizer.baseline_comparison.target_analyzer as ta |
|
|
||
| @pytest.mark.parametrize("benchmark_id", [None, "invalid", 0, True]) | ||
| def test_agentx_rows_without_joinable_id_keep_only_throughput(tmp_path, monkeypatch, benchmark_id): | ||
| import hyperloom.inference_optimizer.baseline_comparison.target_analyzer as ta |
|
|
||
| @pytest.mark.parametrize("precision", ["mxfp4", "nvfp4"]) | ||
| def test_agentx_precision_alias_is_explicitly_an_upstream_bucket(tmp_path, monkeypatch, precision): | ||
| import hyperloom.inference_optimizer.baseline_comparison.target_analyzer as ta |
| ], | ||
| ) | ||
| def test_agentx_no_match_diagnostics_do_not_request_derived_metrics(tmp_path, monkeypatch, rows, reason): | ||
| import hyperloom.inference_optimizer.baseline_comparison.target_analyzer as ta |
|
|
||
|
|
||
| def test_agentx_no_target_persists_marker_without_network(tmp_path, monkeypatch): | ||
| import hyperloom.inference_optimizer.baseline_comparison.target_analyzer as ta |
|
|
||
|
|
||
| def test_synthetic_analysis_never_fetches_agentic_p90(tmp_path, monkeypatch): | ||
| import hyperloom.inference_optimizer.baseline_comparison.target_analyzer as ta |
|
|
||
|
|
||
| def test_agentx_analysis_joins_p90_before_selecting_one_real_reference(tmp_path, monkeypatch): | ||
| import hyperloom.inference_optimizer.baseline_comparison.target_analyzer as ta |
|
|
||
| @pytest.mark.parametrize("derived", [{"1": None}, {}, None]) | ||
| def test_agentx_analysis_preserves_total_when_p90_is_unavailable(tmp_path, monkeypatch, derived): | ||
| import hyperloom.inference_optimizer.baseline_comparison.target_analyzer as ta |
|
|
||
|
|
||
| def test_agentx_p90_selection_is_stable_and_never_prefers_missing_metric(tmp_path, monkeypatch): | ||
| import hyperloom.inference_optimizer.baseline_comparison.target_analyzer as ta |
|
|
||
| @pytest.mark.parametrize("benchmark_id", [None, "invalid", 0, True]) | ||
| def test_agentx_rows_without_joinable_id_keep_only_throughput(tmp_path, monkeypatch, benchmark_id): | ||
| import hyperloom.inference_optimizer.baseline_comparison.target_analyzer as ta |
|
|
||
| @pytest.mark.parametrize("precision", ["mxfp4", "nvfp4"]) | ||
| def test_agentx_precision_alias_is_explicitly_an_upstream_bucket(tmp_path, monkeypatch, precision): | ||
| import hyperloom.inference_optimizer.baseline_comparison.target_analyzer as ta |
| ], | ||
| ) | ||
| def test_agentx_no_match_diagnostics_do_not_request_derived_metrics(tmp_path, monkeypatch, rows, reason): | ||
| import hyperloom.inference_optimizer.baseline_comparison.target_analyzer as ta |
|
|
||
|
|
||
| def test_agentx_no_target_persists_marker_without_network(tmp_path, monkeypatch): | ||
| import hyperloom.inference_optimizer.baseline_comparison.target_analyzer as ta |
|
|
||
|
|
||
| def test_synthetic_analysis_never_fetches_agentic_p90(tmp_path, monkeypatch): | ||
| import hyperloom.inference_optimizer.baseline_comparison.target_analyzer as ta |
|
Closing the 0. Blocking: verify the upstream contract before anything else. 1. One definition of 2. One source of GPU count. 3. Trust the accepted measurement. 4. One agentx predicate. 5. One competitor-target assembly, one gap vocabulary. 6. Reuse the numeric helpers, drop the escape hatch. 7. Whatever survives gets documented and typed. The comparison is worth having. What should merge is "we can now match agentic |
Establish an in-progress JSON snapshot before upstream work, preserve it on terminal write failure, and treat Markdown as a best-effort projection. Propagate storage errors without claiming a successful refresh. Co-Authored-By: Claude <noreply@anthropic.com>
Remove the new derived-P90 type-check errors while retaining the existing finite-positive numeric response contract. Co-Authored-By: Claude <noreply@anthropic.com>
Render controlled per-axis explanations in advisory and final reports, retain usable metric gaps, and keep unknown reason text out of prompts. Co-Authored-By: Claude <noreply@anthropic.com>
|
The three new commits move in the opposite direction from the review. Nothing To be direct: the review asked you to delete code, not to explain it better.
Item 7 is the clearest sign the intent didn't land. The ask was to remove reason CI being green is not evidence here. The two real risks are (a) four unverified Gate for the next push — these three, in order, before anything else:
After those three, the local side is two lines, |
Remove request-record recomputation, local measurement revalidation, comparison-only provenance, and the extra analysis lifecycle. Reuse accepted metrics and serving TP, share the persisted competitor target, and retain latency/throughput advisory categories. Constrain remaining reason codes, add contextual diagnostics, and align documentation and tests with the simplified contract. Co-Authored-By: Claude <noreply@anthropic.com>
| '{"metrics": {"request_latency": 1000, "time_to_first_token": 10, ' | ||
| '"input_sequence_length": 128, "output_sequence_length": 10}}\n', |
| '{"metrics": {"request_latency": 1000, "time_to_first_token": 10, ' | ||
| '"input_sequence_length": 128, "output_sequence_length": 10}}\n', |
Summary
Verification
Scope
🤖 Generated with Claude Code