Skip to content

Commit 990ff44

Browse files
committed
fix error test
Signed-off-by: Yang Wang <[email protected]>
1 parent 8de90bf commit 990ff44

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

.ci/scripts/benchmark_tooling/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ pip install -r requirements.txt
1212
## Tools
1313

1414
### get_benchmark_analysis_data.py
15+
This script mainlu used to generate analysis data between private device and public device with same settings.
1516

16-
This script fetches benchmark data from HUD Open API, cleans data that only contains FAILURE_REPORT columns, and retrieves all private device metrics and associated public device metrics based on [model, backend, device, arch].
17-
17+
It fetches benchmark data from HUD Open API for a time range, then cleans the data with FAILURE inidcator, and retrieves all private device metrics and equivalent public device metrics based on [model, backend, device_pool_names, arch]. User can filter the data by specifying private device_pool_names, backends, and models for private devices.
1818
#### Quick Start
1919

2020
```bash

.ci/scripts/benchmark_tooling/get_benchmark_analysis_data.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,11 @@ def normalize_string(self, s: str) -> str:
629629
def filter_private_results(
630630
self, all_privates: List[Dict[str, Any]], filters: BenchmarkFilters
631631
):
632-
# fetch all private devices within the time range for samsung and ios
632+
"""
633+
dynamically filter private device data based on filters, if any.
634+
fetch all private devices within the time range, and then filter based on filter parameters
635+
such as device_pool, backends, and models.
636+
"""
633637
private_devices = self.get_all_private_devices()
634638

635639
device_pool = filters.devicePoolNames or set()
@@ -659,6 +663,7 @@ def filter_private_results(
659663
continue
660664

661665
if device_ios_match:
666+
# must match both device and arch in a record, otherwise skip
662667
pair = (info.get("device", ""), info.get("arch", ""))
663668
if pair not in device_ios_match:
664669
continue
@@ -716,18 +721,18 @@ def argparsers():
716721
parser.add_argument(
717722
"--backends",
718723
nargs="+",
719-
help="Filter results by one or more backend full name(e.g. --backend qlora mv3) (OR logic within backends scope, AND logic with other filter type)",
724+
help="Filter results by one or more backend full name(e.g. --backends qlora mv3) (OR logic within backends scope, AND logic with other filter type)",
720725
)
721726
parser.add_argument(
722727
"--private-device-pools",
723728
nargs="+", # allow one or more values
724729
choices=VALID_PRIVATE_DEVICE_POOLS_NAMES,
725-
help="List of devices to include",
730+
help="List of devices to include [apple_iphone_15_private, samsung_s22_private, you can include both] (OR logic within private-device-pools scope, AND logic with other filter type)",
726731
)
727732
parser.add_argument(
728733
"--models",
729734
nargs="+",
730-
help="Filter by one or more models (OR logic withn models scope, AND logic with other filter type)",
735+
help="Filter by one or more models (e.g. --backend 'meta-llama/Llama-3.2-1B-Instruct-SpinQuant_INT4_EO8' 'mv3') (OR logic withn models scope, AND logic with other filter type)",
731736
)
732737
return parser.parse_args()
733738

0 commit comments

Comments
 (0)