File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 6
6
from datasets import load_metric
7
7
import os
8
8
9
- os .environ ["CUDA_VISIBLE_DEVICES" ] = ""
9
+ # os.environ["CUDA_VISIBLE_DEVICES"] = ""
10
10
11
11
if __name__ == "__main__" :
12
12
# tokenizer = AutoTokenizer.from_pretrained("xlm-roberta-base")
13
13
model = MRCQuestionAnswering .from_pretrained ("xlm-roberta-large" ,
14
14
cache_dir = './model-bin/cache' ,
15
- local_files_only = True )
15
+ #local_files_only=True
16
+ )
16
17
print (model )
17
18
print (model .config )
18
19
19
20
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' ,
22
22
valid_path = './data-bin/processed/valid.dataset'
23
23
)
24
24
44
44
metric_for_best_model = 'f1' ,
45
45
load_best_model_at_end = True ,
46
46
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" ,
50
50
)
51
51
52
52
trainer = Trainer (
You can’t perform that action at this time.
0 commit comments