extend command line --test to trigger speedup measure#2536
Conversation
|
@copilot can you documentation the option somewhere |
Added documentation for the new |
There was a problem hiding this comment.
Pull request overview
This PR extends Olive’s CLI --test workflow by allowing callers to choose which discrepancy-check metrics are evaluated (accuracy via MAE and/or speedup via latency timing), and adds coverage + documentation for the new option.
Changes:
- Add
--test_metricsCLI option (choices:mae,speedup) and plumb it througholive runand the base CLI workflow runner. - Update discrepancy-check pass injection to enable/disable MAE threshold enforcement and speedup timing based on selected metrics.
- Add unit tests for metric selection behavior and warning when
--test_metricsis provided without--test, plus docs describing usage.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| test/cli/test_base.py | Adds tests for metric-selection behavior and unused-flag warning behavior. |
| olive/cli/run.py | Passes test_metrics into discrepancy-check injection and warns when --test_metrics is unused. |
| olive/cli/base.py | Introduces TEST_METRICS, --test_metrics arg, warning helper, and metric-aware discrepancy pass injection. |
| docs/source/how-to/cli/cli-fast-test.md | Documents --test_metrics and provides an example for speedup-only runs. |
|
@copilot test/cli/test_base.py:360: in test_add_discrepancy_check_pass_default_enables_all_metrics |
Fixed in the latest commit. The test was asserting the old behavior (default = all metrics, so |
|
@copilot fix test/cli/test_cli.py:178: in test_workflow_run_command_with_test_override |
Fixed in the latest commit. Added |
Describe your changes
--test only enables discrepancy measure by default, it needs to be extended to let the user add speedup measures