fix typo in negative sample selection
Browse files- finetune.py +5 -5
- pytorch_model.bin +1 -1
- pytorch_model.onnx +1 -1
finetune.py
CHANGED
@@ -29,7 +29,7 @@ class ESCIDataset(Dataset):
|
|
29 |
for p in query['e']:
|
30 |
positive = p['title']
|
31 |
for n in query['i']:
|
32 |
-
negative =
|
33 |
self.queries.append(InputExample(texts=[query['query'], positive, negative]))
|
34 |
|
35 |
def __getitem__(self, item):
|
@@ -68,11 +68,11 @@ model.fit(train_objectives=[(train_dataloader, train_loss)],
|
|
68 |
epochs=num_epochs,
|
69 |
warmup_steps=warmup_steps,
|
70 |
use_amp=True,
|
71 |
-
checkpoint_path=model_save_path,
|
72 |
-
checkpoint_save_steps=len(train_dataloader),
|
73 |
optimizer_params = {'lr': lr},
|
74 |
-
|
75 |
-
# evaluation_steps=
|
76 |
output_path=model_save_path
|
77 |
)
|
78 |
|
|
|
29 |
for p in query['e']:
|
30 |
positive = p['title']
|
31 |
for n in query['i']:
|
32 |
+
negative = n['title']
|
33 |
self.queries.append(InputExample(texts=[query['query'], positive, negative]))
|
34 |
|
35 |
def __getitem__(self, item):
|
|
|
68 |
epochs=num_epochs,
|
69 |
warmup_steps=warmup_steps,
|
70 |
use_amp=True,
|
71 |
+
# checkpoint_path=model_save_path,
|
72 |
+
# checkpoint_save_steps=len(train_dataloader),
|
73 |
optimizer_params = {'lr': lr},
|
74 |
+
evaluator=evaluator,
|
75 |
+
# evaluation_steps=1000,
|
76 |
output_path=model_save_path
|
77 |
)
|
78 |
|
pytorch_model.bin
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 90891565
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:089d832e391c446f9bc7df2f9b5f772405a7e762506908f9a22b6a71fb172e74
|
3 |
size 90891565
|
pytorch_model.onnx
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 90984263
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:cfa7e76b1b76b1617d7188ce710c8f03ac0c85463f8ad55b276c484d2c7c725a
|
3 |
size 90984263
|