shuttie commited on
Commit
3669fe2
·
1 Parent(s): 028be65

fix typo in negative sample selection

Browse files
Files changed (3) hide show
  1. finetune.py +5 -5
  2. pytorch_model.bin +1 -1
  3. 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 = p['title']
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
- # evaluator=evaluator,
75
- # evaluation_steps=300,
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:5aae60cda92f5f51c6aa5d10b1cee0266982c0c10becef516cc9062d2bad9b67
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:05218f129c6611d20167c617dc6f6df81a45fdbc8d094ba8cdd1bfbc96aeb947
3
  size 90984263
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cfa7e76b1b76b1617d7188ce710c8f03ac0c85463f8ad55b276c484d2c7c725a
3
  size 90984263