diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 2a319323074..cb9a3d7b797 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -31,12 +31,12 @@ jobs: if: github.event_name == 'schedule' working-directory: /transformers 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 - name: Benchmark (merged to main event) if: github.event_name == 'push' && github.ref_name == 'main' working-directory: /transformers 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 diff --git a/benchmark/benchmark.py b/benchmark/benchmark.py index 94e204a581b..304bbd4441c 100644 --- a/benchmark/benchmark.py +++ b/benchmark/benchmark.py @@ -101,7 +101,7 @@ def summarize(run_dir, metrics, expand_metrics=False): # post-processing of report: show a few selected/important metric for metric in metrics: keys = metric.split(".") - value = report + value = report.to_dict() current = metrics_values for key in keys: # Avoid KeyError when a user's specified metric has typo. diff --git a/setup.py b/setup.py index e49b40ac971..26cb0faca07 100644 --- a/setup.py +++ b/setup.py @@ -137,7 +137,7 @@ _deps = [ "onnxruntime-tools>=1.4.2", "onnxruntime>=1.4.0", "opencv-python", - "optimum-benchmark>=0.2.0", + "optimum-benchmark>=0.3.0", "optuna", "optax>=0.0.8,<=0.1.4", "packaging>=20.0", diff --git a/src/transformers/dependency_versions_table.py b/src/transformers/dependency_versions_table.py index 68e76612887..d8347371b3a 100644 --- a/src/transformers/dependency_versions_table.py +++ b/src/transformers/dependency_versions_table.py @@ -43,7 +43,7 @@ deps = { "onnxruntime-tools": "onnxruntime-tools>=1.4.2", "onnxruntime": "onnxruntime>=1.4.0", "opencv-python": "opencv-python", - "optimum-benchmark": "optimum-benchmark>=0.2.0", + "optimum-benchmark": "optimum-benchmark>=0.3.0", "optuna": "optuna", "optax": "optax>=0.0.8,<=0.1.4", "packaging": "packaging>=20.0",