Repository navigation
Codex/benchmark methodology doc - #68
Conversation
Reviewer's GuideAdds a new prose benchmark methodology document and wires it into tests and existing docs so methodology, scope, and architecture references stay consistent while clarifying DataLoader benchmark semantics. Flow diagram for benchmark control flow and dispatchflowchart LR
A[Checked_in_YAML_config] --> B[benchmark_cli_py]
B --> C[benchmark_config_resolve_py]
C --> D[benchmark_config_models_py]
D --> E[benchmark_config_plan_py]
E --> F[benchmark_jobs_py]
F --> G[benchmark_matrix_py]
G --> H[benchmark_orchestrator_py]
H --> I[benchmark_pyperf_micro_runner_py]
H --> J[benchmark_pipeline_runner_py]
H --> K[benchmark_dali_pipeline_worker_py]
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_methodology_doc_references_core_policy_modulestest couples the methodology doc tightly to specific file paths, which may cause unnecessary test churn when files move or are renamed; consider only asserting the presence of higher-level concepts or a smaller, more stable subset of modules. - The
assert not any(line.startswith("|") for line in doc.splitlines())check broadly forbids any line beginning with|, which may block legitimate future use of markdown tables or code examples; consider scoping this constraint to specific sections or using a more targeted pattern.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The `test_methodology_doc_references_core_policy_modules` test couples the methodology doc tightly to specific file paths, which may cause unnecessary test churn when files move or are renamed; consider only asserting the presence of higher-level concepts or a smaller, more stable subset of modules.
- The `assert not any(line.startswith("|") for line in doc.splitlines())` check broadly forbids any line beginning with `|`, which may block legitimate future use of markdown tables or code examples; consider scoping this constraint to specific sections or using a more targeted pattern.
## Individual Comments
### Comment 1
<location path="tests/test_architecture_docs.py" line_range="83" />
<code_context>
+ assert module_path in doc
+ assert (REPO_ROOT / module_path).exists()
+
+ assert not any(line.startswith("|") for line in doc.splitlines())
+
+
</code_context>
<issue_to_address>
**issue:** The no-table assertion misses lines with leading whitespace before '|'
This won’t catch tables when the `|` is indented (e.g. `' | col |'`). Consider stripping leading whitespace before the check, e.g. `any(line.lstrip().startswith("|") for line in doc.splitlines())`, so indented tables are also rejected.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
There was a problem hiding this comment.
Pull request overview
This PR introduces a new prose “benchmark methodology” document intended to be the canonical narrative description of what the benchmark measures (and excludes), then wires it into existing documentation and adds tests to ensure the doc stays referenced and aligned with core modules.
Changes:
- Add
docs/benchmark_methodology.mddescribing benchmark scopes (micro vs DataLoader vs GPU vs DALI), transform selection policy, isolation, and execution flow. - Link the new methodology doc from
README.mdanddocs/benchmark_scope.md(and tighten wording around DataLoader recipe measurement scope). - Add tests that enforce the new doc is referenced and mentions key implementation modules.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
tests/test_architecture_docs.py |
Adds assertions that the methodology doc is referenced and contains required module references. |
README.md |
Replaces the inline Methodology section with a link to the dedicated methodology doc; clarifies DataLoader benchmark scope. |
docs/benchmark_scope.md |
Adds a pointer to the new methodology doc and clarifies that fixed recipe steps are part of DataLoader throughput. |
docs/benchmark_methodology.md |
New long-form methodology source document describing benchmark measurement regimes and rationale. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary by Sourcery
Introduce a detailed benchmark methodology reference document and wire it into existing docs and tests so methodology, scope, and architecture remain consistent and discoverable.
Documentation:
Tests: