feat(cli): added run benchmarks command to execute benchmark instances on PR#131
Conversation
|
Checks Summary Last run: 2026-06-11T14:37:24.346Z Mend Unified Agent vulnerability scan found 18 vulnerabilities:
|
|
@christian-pinto The above docs don't say which benchmarks are run or how this is decided i.e. how the discovery happens. |
Right, good point. It's only the benchmark instances added or modified with the PR that are executed. Let me add it somewhere in the cli reference documentation. |
@michael-johnston it's actually already in the cli reference documentation ### Subcommands
#### nexus run benchmarks
Execute benchmarks from a GitHub Pull Request. This command identifies new or
changed benchmark instances in a PR and optionally executes them using the `ado`
CLI.It's just here in the PR description that I do not say it. |
|
I'm looking for something about how a change is identified e.g. is it just a change to ado YAML, is it any change to a. model.yaml, is it any new benchmark_instance folder, ... |
…s on PR Signed-off-by: Christian Pinto <christian.pinto@ibm.com>
d7b0b98 to
eb6d19b
Compare
…the nexus package Signed-off-by: Christian Pinto <christian.pinto@ibm.com>
AlessandroPomponio
left a comment
There was a problem hiding this comment.
I wonder if it's best to require ado as part of some dependency group or something and use the pydantic models to create the operations, spaces, etc instead of hardcoding templates that are likely to become obsolete
Signed-off-by: Christian Pinto <christian.pinto@ibm.com>
Signed-off-by: Christian Pinto <christian.pinto@ibm.com>
Signed-off-by: Christian Pinto <christian.pinto@ibm.com>
Signed-off-by: Christian Pinto <christian.pinto@ibm.com>
Signed-off-by: Christian Pinto <christian.pinto@ibm.com>
… command Signed-off-by: Christian Pinto <christian.pinto@ibm.com>
Signed-off-by: Christian Pinto <christian.pinto@ibm.com>
Signed-off-by: Christian Pinto <christian.pinto@ibm.com>
Signed-off-by: Christian Pinto <christian.pinto@ibm.com>
Signed-off-by: Christian Pinto <christian.pinto@ibm.com>
Add
nexus run benchmarksCommand for PR-based Benchmark ExecutionOverview
This PR introduces a new
nexus run benchmarkscommand that automaticallydiscovers and executes benchmark instances from GitHub Pull Requests. The
command identifies benchmarks instances that are added or modified in the PR
ad optionally executes them using the ado cli.
The command integrates with the ADO CLI to
run benchmarks either locally or on remote Ray clusters.
It can be tested against this PR: #128
New Features
1.
nexus run benchmarksCommandA new CLI command that:
commit
Command Syntax
Options
--pr <url>(required): GitHub Pull Request URL--remote <path>: Execute on remote Ray cluster using specified context file--context <path>: Path to ADO context YAML file (samplestore context)--list-only: List benchmarks without executing (dry-run mode)--output <path>: Output results to JSON file (default:output.json)Usage Examples
List benchmarks without executing:
Execute benchmarks locally:
Execute on remote Ray cluster:
2. Enhanced Output Format
The command generates a structured JSON output file with detailed execution
results:
{ "instances": [ { "instance_path": "packages/terratorch/models/prithvi/benchmark_instances/test_benchmark", "status": "success", "message": "Successfully created space space-727742-default and operation raysubmit_j3ZEYpEy8XLCZPSG", "space_id": "space-727742-default", "operation_id": "raysubmit_j3ZEYpEy8XLCZPSG", "ray_job_id": "raysubmit_j3ZEYpEy8XLCZPSG" }, { "instance_path": "packages/terratorch/models/terramind_base_fire/benchmark_instances/test_benchmark", "status": "success", "message": "Successfully created space space-db2681-default and operation raysubmit_CqXY6ypLNkMLuBwD", "space_id": "space-db2681-default", "operation_id": "raysubmit_CqXY6ypLNkMLuBwD", "ray_job_id": "raysubmit_CqXY6ypLNkMLuBwD" } ], }Output Fields:
instance_path: Path to the benchmark instancestatus: Execution status (successorfailed)message: Detailed status messagespace_id: ADO discovery space identifieroperation_id: ADO operation identifierray_job_id: Ray job identifier (for remote execution tracking)summary: Aggregate statistics (successful/failed counts)3. Automatic PR Checkout
The command intelligently handles repository state:
gh) for seamless PR operations4. Enhanced Metadata
Operations and spaces now include descriptive names and metadata:
Operation naming:
randomwalk-pr{number}-{package}-{model}-{instance}randomwalk-pr123-terratorch-prithvi-test_benchmarkSpace naming:
space-pr{number}-{package}-{model}-{instance}space-pr123-terratorch-prithvi-test_benchmarkMetadata includes:
5. Remote Execution Support
When using
--remote, the command:nexus.yaml