apps-queries-corpus / README.md
CO-IR's picture
Update README.md
1ca5257 verified
metadata
dataset_info:
  features:
    - name: _id
      dtype: string
    - name: partition
      dtype: string
    - name: text
      dtype: string
    - name: language
      dtype: string
    - name: meta_information
      struct:
        - name: starter_code
          dtype: string
        - name: url
          dtype: string
    - name: title
      dtype: string
  splits:
    - name: queries
      num_bytes: 13633677
      num_examples: 8765
    - name: corpus
      num_bytes: 6044437
      num_examples: 8765
  download_size: 0
  dataset_size: 19678114

Employing the CoIR evaluation framework's dataset version, utilize the code below for assessment:

import coir
from coir.data_loader import get_tasks
from coir.evaluation import COIR
from coir.models import YourCustomDEModel

model_name = "intfloat/e5-base-v2"

# Load the model
model = YourCustomDEModel(model_name=model_name)

# Get tasks
#all task ["codetrans-dl","stackoverflow-qa","apps","codefeedback-mt","codefeedback-st","codetrans-contest","synthetic-
# text2sql","cosqa","codesearchnet","codesearchnet-ccr"]
tasks = get_tasks(tasks=["codetrans-dl"])

# Initialize evaluation
evaluation = COIR(tasks=tasks,batch_size=128)

# Run evaluation
results = evaluation.run(model, output_folder=f"results/{model_name}")
print(results)