mirror of
https://github.com/huggingface/transformers.git
synced 2025-10-20 17:13:56 +08:00
feat: adress PR comments
This commit is contained in:
2
.github/workflows/benchmark.yml
vendored
2
.github/workflows/benchmark.yml
vendored
@ -52,7 +52,7 @@ jobs:
|
|||||||
commit_id=$GITHUB_SHA
|
commit_id=$GITHUB_SHA
|
||||||
fi
|
fi
|
||||||
commit_msg=$(git show -s --format=%s | cut -c1-70)
|
commit_msg=$(git show -s --format=%s | cut -c1-70)
|
||||||
python3 benchmark_v2/run_benchmarks.py -b 1 -w 1 -i 1 -s 32 -n 5 --branch-name "$BRANCH_NAME" --commit-id "$commit_id" --commit-message "$commit_msg" --model-id "$MODEL_ID" --log-level INFO --push-result-to-dataset "$DATASET_ID"
|
python3 benchmark_v2/run_benchmarks.py -b 32 -s 128 -n 256 --branch-name "$BRANCH_NAME" --commit-id "$commit_id" --commit-message "$commit_msg" --model-id "$MODEL_ID" --log-level INFO --push-result-to-dataset "$DATASET_ID"
|
||||||
env:
|
env:
|
||||||
HF_TOKEN: ${{ secrets.HF_HUB_READ_TOKEN }}
|
HF_TOKEN: ${{ secrets.HF_HUB_READ_TOKEN }}
|
||||||
PUSH_TO_HUB_TOKEN: ${{ secrets.PUSH_TO_HUB_TOKEN }}
|
PUSH_TO_HUB_TOKEN: ${{ secrets.PUSH_TO_HUB_TOKEN }}
|
||||||
|
@ -12,6 +12,8 @@ from queue import Queue
|
|||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
import torch
|
import torch
|
||||||
|
from datasets import Dataset
|
||||||
|
from huggingface_hub import HfApi
|
||||||
from tqdm import trange
|
from tqdm import trange
|
||||||
|
|
||||||
from transformers import (
|
from transformers import (
|
||||||
@ -419,9 +421,6 @@ class BenchmarkRunner:
|
|||||||
"PUSH_TO_HUB_TOKEN is not set, cannot push results to the Hub. When setting dataset_id, please also set the PUSH_TO_HUB_TOKEN environment variable."
|
"PUSH_TO_HUB_TOKEN is not set, cannot push results to the Hub. When setting dataset_id, please also set the PUSH_TO_HUB_TOKEN environment variable."
|
||||||
)
|
)
|
||||||
|
|
||||||
from datasets import Dataset
|
|
||||||
from huggingface_hub import HfApi
|
|
||||||
|
|
||||||
n_results = len(results)
|
n_results = len(results)
|
||||||
self.logger.info(f"Pushing {n_results} results to: {dataset_id}")
|
self.logger.info(f"Pushing {n_results} results to: {dataset_id}")
|
||||||
rows = []
|
rows = []
|
||||||
|
Reference in New Issue
Block a user