Home

Awesome

covidfaq

Setup

We use poetry. Run poetry install at the root of the repo.

Git LFS

The model (*.ckpt) is tracked with Git LFS (Large File System)

Evaluator

The code for the evaluator can be found under covidfaq/evaluating.

Run an evaluation

The main script is evaluator.py. It needs to be pointed to a json file containing the evaluation data and to know which model should be evaluated. Optionally, it accept a config file to initialize the model. E.g.,

poetry run python covidfaq/evaluating/evaluator.py
  --test-data=covidfaq/evaluating/faq_eval_data.json 
  --model-type=embedding_based_reranker
  --config=[...]/config.yaml

poetry run python covidfaq/evaluating/evaluator.py
  --test-data=covidfaq/evaluating/faq_eval_data.json 
  --model-type=cheating_model

Evaluating google's model

To evaluate google's model, export your authentication key as an environment variable: export GCLOUD_AUTH_TOKEN=$(gcloud auth application-default print-access-token)

then run:

poetry run python covidfaq/evaluating/evaluator.py
  --test-data=covidfaq/evaluating/faq_eval_data.json 
  --model-type=google_model

How to evaluate a new model

To use the evaluator with a new model, two modifications must be done: