-
Notifications
You must be signed in to change notification settings - Fork 762
feat: update how inputs are input into the benchmark script #3187
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
feat: update how inputs are input into the benchmark script #3187
Conversation
Signed-off-by: Hannah Zhang <[email protected]>
Signed-off-by: Hannah Zhang <[email protected]>
Signed-off-by: Hannah Zhang <[email protected]>
WalkthroughThe CLI switches from --input label=URL to explicit --benchmark_name and --endpoint_url. Validation now uses validate_benchmark_name and validate_endpoint. The in-cluster job YAML and documentation are updated accordingly. Plotting and output directories are keyed by benchmark name. Supported backends mention external HTTP endpoints. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor U as User
participant C as CLI (benchmark.py)
participant V as Validators
participant R as Benchmark Runner
participant E as Endpoint (HTTP/In-cluster)
U->>C: Invoke with --benchmark_name, --endpoint_url
C->>V: validate_benchmark_name(name)
V-->>C: ok / error
C->>V: validate_endpoint(url)
V-->>C: ok / error
rect rgba(220,240,255,0.6)
note right of C: Build single mapping {name: url}
C->>R: run_benchmark_workflow({name: url})
end
R->>E: Send benchmark requests
E-->>R: Responses/metrics
R-->>C: Results
C-->>U: Outputs & plots under name/
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
Pre-merge checks❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Actionable comments posted: 4
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
docs/benchmarks/benchmarking.md (1)
341-347: Replace ${INPUT_NAME} with ${BENCHMARK_NAME} in retrieval commands.The CLI no longer uses input labels; this will confuse users and copy/paste will fail.
python3 -m deploy.utils.download_pvc_results \ --namespace $NAMESPACE \ - --output-dir ./benchmarks/results/${INPUT_NAME} \ - --folder /data/results/${INPUT_NAME} \ + --output-dir ./benchmarks/results/${BENCHMARK_NAME} \ + --folder /data/results/${BENCHMARK_NAME} \ --no-config
🧹 Nitpick comments (2)
benchmarks/utils/benchmark.py (2)
15-33: Also validate port range for HTTP(S) endpoints.Currently HTTP(S) endpoints skip port checks; add a simple bound check.
if is_running_in_cluster(): # Allow HTTP(S) or internal service URLs like host[:port][/path] if has_http_scheme(v): - pass + parts = urlsplit(v) + if parts.port is not None and not (1 <= parts.port <= 65535): + raise ValueError("Endpoint port must be 1-65535") else: parts = urlsplit(f"//{v}") host_ok = bool(parts.hostname) port_ok = parts.port is None or (1 <= parts.port <= 65535) if not (host_ok and port_ok): raise ValueError( f"Endpoint must be HTTP(S) or internal service URL. Got: {endpoint}" )
58-62: Clarify argparse help to mention in‑cluster service URLs.- help="HTTP endpoint URL to benchmark (e.g., http://localhost:8000)", + help="Endpoint to benchmark: HTTP(S) URL (e.g., http://localhost:8000) or in-cluster service URL host[:port]",
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
benchmarks/README.md(2 hunks)benchmarks/incluster/benchmark_job.yaml(1 hunks)benchmarks/utils/benchmark.py(2 hunks)docs/benchmarks/benchmarking.md(13 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
benchmarks/utils/benchmark.py (2)
deploy/utils/kubernetes.py (1)
is_running_in_cluster(27-30)benchmarks/utils/workflow.py (2)
has_http_scheme(12-14)run_benchmark_workflow(86-105)
🪛 Ruff (0.13.1)
benchmarks/utils/benchmark.py
27-29: Avoid specifying long messages outside the exception class
(TRY003)
32-32: Avoid specifying long messages outside the exception class
(TRY003)
38-38: Avoid specifying long messages outside the exception class
(TRY003)
44-44: Avoid specifying long messages outside the exception class
(TRY003)
48-48: Avoid specifying long messages outside the exception class
(TRY003)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Build and Test - dynamo
Signed-off-by: Hannah Zhang <[email protected]>
Signed-off-by: Hannah Zhang <[email protected]>
Signed-off-by: Hannah Zhang <[email protected]>
Signed-off-by: Hannah Zhang <[email protected]>
Signed-off-by: Hannah Zhang <[email protected]>
biswapanda
left a comment
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.
few minor points. lgtm otherwise
Signed-off-by: Hannah Zhang <[email protected]>
|
@tmonty12 @biswapanda sounds good, I'll add that note! |
|
/ok to test 4a905f5 |
Signed-off-by: Hannah Zhang <[email protected]> Signed-off-by: Kyle H <[email protected]>
Overview:
instead of
--input name=url, useDetails:
Where should the reviewer start?
Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)
Summary by CodeRabbit
New Features
Documentation
Chores