Codex/update arxiv preprint citation#35
Conversation
Reviewer's GuideAdds a new LaTeX platform recommendation table generator (including escaping helpers and deterministic selection logic), configures matplotlib font types for vector output, and updates the README citation to the new arXiv preprint, with tests covering the new table output expectations. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 1 issue, and left some high level feedback:
- The
test_platform_recommendation_table_has_three_zero_skip_choices_per_platformtest hard-codes exact throughput values and worker counts, which will make it very brittle to any change in source data; consider asserting structural properties (e.g., counts, ordering, presence/absence of libraries) rather than exact numeric strings. - The LaTeX table assembly in
generate_platform_recommendation_tableis largely built from inline raw string fragments; consider factoring the common LaTeX boilerplate or format patterns into small helpers/constants to reduce duplication and make future layout changes easier.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The `test_platform_recommendation_table_has_three_zero_skip_choices_per_platform` test hard-codes exact throughput values and worker counts, which will make it very brittle to any change in source data; consider asserting structural properties (e.g., counts, ordering, presence/absence of libraries) rather than exact numeric strings.
- The LaTeX table assembly in `generate_platform_recommendation_table` is largely built from inline raw string fragments; consider factoring the common LaTeX boilerplate or format patterns into small helpers/constants to reduce duplication and make future layout changes easier.
## Individual Comments
### Comment 1
<location path="tests/test_paper_assets.py" line_range="141-150" />
<code_context>
assert expected_prefix in matching_line
+
+
+def test_platform_recommendation_table_has_three_zero_skip_choices_per_platform(tmp_path: Path) -> None:
+ root = _repo_output()
+ dest = tmp_path / "table07_platform_recommendations.tex"
+ generate_platform_recommendation_table(load_dataloader_results(root), dest)
+
+ text = dest.read_text(encoding="utf-8")
+ data_rows = [line for line in text.splitlines() if "GCP \\texttt" in line]
+ assert len(data_rows) == len(PAPER_PLATFORMS)
+ assert all(row.count("img/s") == 3 for row in data_rows)
+
+ for decoder in EXPECTED_SKIP_DECODERS:
+ assert f"\\texttt{{{decoder}}}:" not in text
+ assert r"\texttt{pyvips}:" not in text
+ assert r"\texttt{tensorflow}:" not in text
+
+ expected_choices = [
</code_context>
<issue_to_address>
**issue (testing):** Missing negative-path test for the case where a platform has fewer than three zero-skip DataLoader choices.
The new test only exercises the happy path with real benchmark data and doesn’t verify the error branch in `_platform_recommendation_rows` that raises `ValueError` when a platform has fewer than three zero-skip choices.
Please add a small synthetic test that builds a minimal `dl` where one platform has only 0–2 zero-skip choices (or temporarily patches `EXPECTED_DATALOADER_DECODERS` / `PAPER_PLATFORMS`), and asserts that `_platform_recommendation_rows` or `generate_platform_recommendation_table` raises `ValueError` with the expected message. This will lock in the failure mode and protect future refactors.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| def test_platform_recommendation_table_has_three_zero_skip_choices_per_platform(tmp_path: Path) -> None: | ||
| root = _repo_output() | ||
| dest = tmp_path / "table07_platform_recommendations.tex" | ||
| generate_platform_recommendation_table(load_dataloader_results(root), dest) | ||
|
|
||
| text = dest.read_text(encoding="utf-8") | ||
| data_rows = [line for line in text.splitlines() if "GCP \\texttt" in line] | ||
| assert len(data_rows) == len(PAPER_PLATFORMS) | ||
| assert all(row.count("img/s") == 3 for row in data_rows) | ||
|
|
There was a problem hiding this comment.
issue (testing): Missing negative-path test for the case where a platform has fewer than three zero-skip DataLoader choices.
The new test only exercises the happy path with real benchmark data and doesn’t verify the error branch in _platform_recommendation_rows that raises ValueError when a platform has fewer than three zero-skip choices.
Please add a small synthetic test that builds a minimal dl where one platform has only 0–2 zero-skip choices (or temporarily patches EXPECTED_DATALOADER_DECODERS / PAPER_PLATFORMS), and asserts that _platform_recommendation_rows or generate_platform_recommendation_table raises ValueError with the expected message. This will lock in the failure mode and protect future refactors.
There was a problem hiding this comment.
Pull request overview
Updates the repository’s publication-facing assets to reflect the new arXiv preprint, and extends the paper asset generator to emit an additional per-platform “starting points” LaTeX table (with a validating test).
Changes:
- Add a new LaTeX table generator for per-platform zero-skip DataLoader recommendations, including LaTeX escaping utilities.
- Add a regression test asserting three zero-skip choices per platform and expected selections from the committed
output/dataset. - Update README with the new preprint link and refreshed BibTeX citation; set Matplotlib font embedding defaults for PDF/PS outputs.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tools/paper_assets.py | Adds LaTeX escaping + a new platform recommendation table generator; sets Matplotlib rcParams for font embedding. |
| tests/test_paper_assets.py | Adds a test validating the generated platform recommendation LaTeX table contents. |
| README.md | Updates the preprint link and BibTeX citation to the new arXiv preprint. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary by Sourcery
Add a new LaTeX platform recommendation table for zero-skip DataLoader choices, ensure generated plots use embeddable fonts, and update the README to reference the new arXiv preprint and citation.
New Features:
Enhancements:
Documentation:
Tests: