mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-28 16:52:24 +06:00
Fix benchmark script (#32635)
* fix * >= 0.3.0 --------- Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
This commit is contained in:
parent
9282413611
commit
bf97d4aa6d
4
.github/workflows/benchmark.yml
vendored
4
.github/workflows/benchmark.yml
vendored
@ -31,12 +31,12 @@ jobs:
|
|||||||
if: github.event_name == 'schedule'
|
if: github.event_name == 'schedule'
|
||||||
working-directory: /transformers
|
working-directory: /transformers
|
||||||
run: |
|
run: |
|
||||||
python3 -m pip install optimum-benchmark>=0.2.0
|
python3 -m pip install optimum-benchmark>=0.3.0
|
||||||
HF_TOKEN=${{ secrets.TRANSFORMERS_BENCHMARK_TOKEN }} python3 benchmark/benchmark.py --repo_id hf-internal-testing/benchmark_results --path_in_repo $(date +'%Y-%m-%d') --config-dir benchmark/config --config-name generation --commit=${{ github.sha }} backend.model=google/gemma-2b backend.cache_implementation=null,static backend.torch_compile=false,true --multirun
|
HF_TOKEN=${{ secrets.TRANSFORMERS_BENCHMARK_TOKEN }} python3 benchmark/benchmark.py --repo_id hf-internal-testing/benchmark_results --path_in_repo $(date +'%Y-%m-%d') --config-dir benchmark/config --config-name generation --commit=${{ github.sha }} backend.model=google/gemma-2b backend.cache_implementation=null,static backend.torch_compile=false,true --multirun
|
||||||
|
|
||||||
- name: Benchmark (merged to main event)
|
- name: Benchmark (merged to main event)
|
||||||
if: github.event_name == 'push' && github.ref_name == 'main'
|
if: github.event_name == 'push' && github.ref_name == 'main'
|
||||||
working-directory: /transformers
|
working-directory: /transformers
|
||||||
run: |
|
run: |
|
||||||
python3 -m pip install optimum-benchmark>=0.2.0
|
python3 -m pip install optimum-benchmark>=0.3.0
|
||||||
HF_TOKEN=${{ secrets.TRANSFORMERS_BENCHMARK_TOKEN }} python3 benchmark/benchmark.py --repo_id hf-internal-testing/benchmark_results_merge_event --path_in_repo $(date +'%Y-%m-%d') --config-dir benchmark/config --config-name generation --commit=${{ github.sha }} backend.model=google/gemma-2b backend.cache_implementation=null,static backend.torch_compile=false,true --multirun
|
HF_TOKEN=${{ secrets.TRANSFORMERS_BENCHMARK_TOKEN }} python3 benchmark/benchmark.py --repo_id hf-internal-testing/benchmark_results_merge_event --path_in_repo $(date +'%Y-%m-%d') --config-dir benchmark/config --config-name generation --commit=${{ github.sha }} backend.model=google/gemma-2b backend.cache_implementation=null,static backend.torch_compile=false,true --multirun
|
||||||
|
@ -101,7 +101,7 @@ def summarize(run_dir, metrics, expand_metrics=False):
|
|||||||
# post-processing of report: show a few selected/important metric
|
# post-processing of report: show a few selected/important metric
|
||||||
for metric in metrics:
|
for metric in metrics:
|
||||||
keys = metric.split(".")
|
keys = metric.split(".")
|
||||||
value = report
|
value = report.to_dict()
|
||||||
current = metrics_values
|
current = metrics_values
|
||||||
for key in keys:
|
for key in keys:
|
||||||
# Avoid KeyError when a user's specified metric has typo.
|
# Avoid KeyError when a user's specified metric has typo.
|
||||||
|
2
setup.py
2
setup.py
@ -137,7 +137,7 @@ _deps = [
|
|||||||
"onnxruntime-tools>=1.4.2",
|
"onnxruntime-tools>=1.4.2",
|
||||||
"onnxruntime>=1.4.0",
|
"onnxruntime>=1.4.0",
|
||||||
"opencv-python",
|
"opencv-python",
|
||||||
"optimum-benchmark>=0.2.0",
|
"optimum-benchmark>=0.3.0",
|
||||||
"optuna",
|
"optuna",
|
||||||
"optax>=0.0.8,<=0.1.4",
|
"optax>=0.0.8,<=0.1.4",
|
||||||
"packaging>=20.0",
|
"packaging>=20.0",
|
||||||
|
@ -43,7 +43,7 @@ deps = {
|
|||||||
"onnxruntime-tools": "onnxruntime-tools>=1.4.2",
|
"onnxruntime-tools": "onnxruntime-tools>=1.4.2",
|
||||||
"onnxruntime": "onnxruntime>=1.4.0",
|
"onnxruntime": "onnxruntime>=1.4.0",
|
||||||
"opencv-python": "opencv-python",
|
"opencv-python": "opencv-python",
|
||||||
"optimum-benchmark": "optimum-benchmark>=0.2.0",
|
"optimum-benchmark": "optimum-benchmark>=0.3.0",
|
||||||
"optuna": "optuna",
|
"optuna": "optuna",
|
||||||
"optax": "optax>=0.0.8,<=0.1.4",
|
"optax": "optax>=0.0.8,<=0.1.4",
|
||||||
"packaging": "packaging>=20.0",
|
"packaging": "packaging>=20.0",
|
||||||
|
Loading…
Reference in New Issue
Block a user