Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,7 @@ def main():
parser.add_argument('-i', "--iter", default=0, type=int,
help='For accuracy measurement only.')
args = parser.parse_args()

device = torch.device("cuda" if torch.cuda.is_available() and not args.no_cuda else "cpu")
args.device = device
args.device = torch.device("cpu")

# Setup logging
logging.basicConfig(format = '%(asctime)s - %(levelname)s - %(name)s - %(message)s',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,9 +298,6 @@ def main():

tokenizer = AutoTokenizer.from_pretrained(model_args.tokenizer_name or model_args.model_name_or_path)

training_args.do_eval = True
training_args.do_predict = False

# Prepare the dataset downloading, preprocessing and metric creation to perform the evaluation step(s)
# Get the datasets: you can either provide your own CSV/JSON/TXT training and evaluation files (see below)
# or just provide the name of one of the public datasets available on the hub at
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ function run_benchmark {
--overwrite_output_dir \
--dataset_name=squad \
--batch_size=${batch_size} \
--do_eval \
--benchmark \
${extra_cmd}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ function run_tuning {
--model_name_or_path=${model_name_or_path} \
--num_heads ${num_heads} \
--hidden_size ${hidden_size} \
--do_eval \
--tune \
${extra_cmd}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,9 +301,6 @@ def main():

tokenizer = AutoTokenizer.from_pretrained(model_args.tokenizer_name or model_args.model_name_or_path)

training_args.do_eval = True
training_args.do_predict = False

# Prepare the dataset downloading, preprocessing and metric creation to perform the evaluation step(s)
# Get the datasets: you can either provide your own CSV/JSON/TXT training and evaluation files (see below)
# or just provide the name of one of the public datasets available on the hub at
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ function run_benchmark {
--overwrite_output_dir \
--dataset_name=squad \
--batch_size=${batch_size} \
--do_eval \
--benchmark \
${extra_cmd}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ function run_tuning {
--model_name_or_path=${model_name_or_path} \
--num_heads ${num_heads} \
--hidden_size ${hidden_size} \
--do_eval \
--tune \
${extra_cmd}
}
Expand Down