Add output
This commit is contained in:
parent
a9ba5d5728
commit
6e057483a7
5272
dev-0/out.tsv
Normal file
5272
dev-0/out.tsv
Normal file
File diff suppressed because it is too large
Load Diff
8
main.py
8
main.py
@ -47,7 +47,8 @@ def main(dirnames):
|
||||
train_data = random.sample(train_data, 15000)
|
||||
|
||||
mname = PT_MODEL_NAME
|
||||
if os.path.exists(MODEL_OUT_NAME):
|
||||
pt = os.path.exists(MODEL_OUT_NAME)
|
||||
if pt:
|
||||
mname = MODEL_OUT_NAME
|
||||
tokenizer = AutoTokenizer.from_pretrained(mname)
|
||||
model = AutoModelForSequenceClassification.from_pretrained(
|
||||
@ -69,8 +70,9 @@ def main(dirnames):
|
||||
|
||||
print("Starting training...")
|
||||
|
||||
trainer.train()
|
||||
trainer.save_model(MODEL_OUT_NAME)
|
||||
if not pt:
|
||||
trainer.train()
|
||||
trainer.save_model(MODEL_OUT_NAME)
|
||||
|
||||
print("Predicting outputs...")
|
||||
|
||||
|
5152
test-A/out.tsv
Normal file
5152
test-A/out.tsv
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user