Skip to content

Commit a9e4872

Browse files
Update main.py
fix typos
1 parent 47f6e71 commit a9e4872

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

main.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@
66
from datasets import load_metric
77
import os
88

9-
os.environ["CUDA_VISIBLE_DEVICES"] = ""
9+
#os.environ["CUDA_VISIBLE_DEVICES"] = ""
1010

1111
if __name__ == "__main__":
1212
# tokenizer = AutoTokenizer.from_pretrained("xlm-roberta-base")
1313
model = MRCQuestionAnswering.from_pretrained("xlm-roberta-large",
1414
cache_dir='./model-bin/cache',
15-
local_files_only=True)
15+
#local_files_only=True
16+
)
1617
print(model)
1718
print(model.config)
1819

1920
train_dataset, valid_dataset = data_loader.get_dataloader(
20-
# train_path='./data-bin/processed/train.dataset',
21-
train_path='./data-bin/processed/valid.dataset',
21+
train_path='./data-bin/processed/train.dataset',
2222
valid_path='./data-bin/processed/valid.dataset'
2323
)
2424

@@ -44,9 +44,9 @@
4444
metric_for_best_model='f1',
4545
load_best_model_at_end=True,
4646
save_total_limit=2,
47-
eval_steps=1,
48-
evaluation_strategy="steps",
49-
# evaluation_strategy="epoch",
47+
#eval_steps=1,
48+
#evaluation_strategy="steps",
49+
evaluation_strategy="epoch",
5050
)
5151

5252
trainer = Trainer(

0 commit comments

Comments
 (0)