darpanaswal commited on
Commit
f2bf451
·
verified ·
1 Parent(s): df4ff7a

Update cross_encoder_reranking_train.py

Browse files
Files changed (1) hide show
  1. cross_encoder_reranking_train.py +2 -2
cross_encoder_reranking_train.py CHANGED
@@ -214,7 +214,7 @@ def get_detailed_instruct(task_description: str, query: str) -> str:
214
  f"\nQuery: {query}"
215
  )
216
 
217
- def hybrid_score(cross_encoder_score, semantic_score, weight_cross=0.7, weight_semantic=0.3):
218
  return (weight_cross * cross_encoder_score) + (weight_semantic * semantic_score)
219
 
220
 
@@ -327,7 +327,7 @@ def main():
327
  default='./documents_content_with_features.json',
328
  help='Path to documents content JSON file')
329
  # Change here from train to test
330
- parser.add_argument('--queries_list', type=str, default='train_queries.json',
331
  help='Path to training queries JSON file')
332
  parser.add_argument('--text_type', type=str, default='TA',
333
  choices=['TA', 'claims', 'description', 'full', 'tac1', 'smart', 'smart2'],
 
214
  f"\nQuery: {query}"
215
  )
216
 
217
+ def hybrid_score(cross_encoder_score, semantic_score, weight_cross=0.5, weight_semantic=0.5):
218
  return (weight_cross * cross_encoder_score) + (weight_semantic * semantic_score)
219
 
220
 
 
327
  default='./documents_content_with_features.json',
328
  help='Path to documents content JSON file')
329
  # Change here from train to test
330
+ parser.add_argument('--queries_list', type=str, default='test_queries.json',
331
  help='Path to training queries JSON file')
332
  parser.add_argument('--text_type', type=str, default='TA',
333
  choices=['TA', 'claims', 'description', 'full', 'tac1', 'smart', 'smart2'],