-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d4b182b
commit c3dc80c
Showing
4 changed files
with
29 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,21 @@ | ||
#!/bin/bash | ||
|
||
DATA_DIR=${PWD}/data/ | ||
ES_RESULT_FILE=$DATA_DIR/validation_es_result.jsonl | ||
FINAL_RESULT_FILENAME=$DATA_DIR/validation_final_result.jsonl | ||
MODEL_PATH=$DATA_DIR/models/rerank_model.model | ||
TOPK=20 | ||
DATA_DIR=${PWD}/data | ||
GOLDEN_FILENAME=$DATA_DIR/test_release.jsonl | ||
ES_RESULT_FILE=$DATA_DIR/test_es_result.jsonl | ||
FINAL_RESULT_FILENAME=$DATA_DIR/test_final_result.jsonl | ||
MODEL_PATH=$DATA_DIR/rerank_model.model | ||
TOPK=50 | ||
|
||
export CUDA_VISIBLE_DEVICES=1 | ||
|
||
# run elasticsearch (BM25) | ||
python3 wsdm_digg/benchmark/benchmarker.py -src_filename $DATA_DIR/validation.jsonl \ | ||
python3 wsdm_digg/benchmark/benchmarker.py -src_filename $DATA_DIR/test_release.jsonl \ | ||
-dest_filename $ES_RESULT_FILE | ||
|
||
# run rerank by bert | ||
python3 wsdm_digg/reranking/predict.py -eval_search_filename $ES_RESULT_FILE \ | ||
-golden_filename $VALID_FILE \ | ||
-golden_filename $GOLDEN_FILENAME \ | ||
-dest_filename $RESULT_DIR/$FINAL_RESULT_FILENAME \ | ||
-model_path $MODEL_PATH \ | ||
-eval_batch_size 10 -topk $TOPK |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters