CoIR-Retrieval/CodeSearchNet-ruby-qrels
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"… See the full description on the dataset page: https://huggingface.co/datasets/CoIR-Retrieval/CodeSearchNet-ruby-qrels.
0223
1---2dataset_info:3 features:4 - name: query_id5 dtype: string6 - name: corpus_id7 dtype: string8 - name: score9 dtype: int6410 splits:11 - name: train12 num_bytes: 67573613 num_examples: 2492714 - name: valid15 num_bytes: 3919616 num_examples: 140017 - name: test18 num_bytes: 3530219 num_examples: 126120 download_size: 31686521 dataset_size: 75023422configs:23- config_name: default24 data_files:25 - split: train26 path: data/train-*27 - split: valid28 path: data/valid-*29 - split: test30 path: data/test-*31---32Employing the CoIR evaluation framework's dataset version, utilize the code below for assessment:33```python34import coir35from coir.data_loader import get_tasks36from coir.evaluation import COIR37from coir.models import YourCustomDEModel38 39model_name = "intfloat/e5-base-v2"40 41# Load the model42model = YourCustomDEModel(model_name=model_name)43 44# Get tasks45#all task ["codetrans-dl","stackoverflow-qa","apps","codefeedback-mt","codefeedback-st","codetrans-contest","synthetic-46# text2sql","cosqa","codesearchnet","codesearchnet-ccr"]47tasks = get_tasks(tasks=["codetrans-dl"])48 49# Initialize evaluation50evaluation = COIR(tasks=tasks,batch_size=128)51 52# Run evaluation53results = evaluation.run(model, output_folder=f"results/{model_name}")54print(results)55```