CodeSearchNet-ccr / README.md
CO-IR's picture
Update README.md
0466f2b verified
metadata
dataset_info:
  - config_name: corpus
    features:
      - name: _id
        dtype: string
      - name: title
        dtype: string
      - name: partition
        dtype: string
      - name: text
        dtype: string
      - name: language
        dtype: string
      - name: meta_information
        struct:
          - name: resource
            dtype: string
    splits:
      - name: corpus
        num_bytes: 6074846
        num_examples: 27588
    download_size: 2609576
    dataset_size: 6074846
  - config_name: go-corpus
    features:
      - name: _id
        dtype: string
      - name: title
        dtype: string
      - name: partition
        dtype: string
      - name: text
        dtype: string
      - name: language
        dtype: string
      - name: meta_information
        struct:
          - name: resource
            dtype: string
    splits:
      - name: corpus
        num_bytes: 38310307
        num_examples: 182735
    download_size: 16421939
    dataset_size: 38310307
  - config_name: go-qrels
    features:
      - name: query-id
        dtype: string
      - name: corpus-id
        dtype: string
      - name: score
        dtype: int64
    splits:
      - name: train
        num_bytes: 4796420
        num_examples: 167288
      - name: valid
        num_bytes: 219750
        num_examples: 7325
      - name: test
        num_bytes: 243660
        num_examples: 8122
    download_size: 2079738
    dataset_size: 5259830
  - config_name: go-queries
    features:
      - name: _id
        dtype: string
      - name: title
        dtype: string
      - name: partition
        dtype: string
      - name: text
        dtype: string
      - name: language
        dtype: string
      - name: meta_information
        struct:
          - name: resource
            dtype: string
    splits:
      - name: queries
        num_bytes: 52487127
        num_examples: 182735
    download_size: 22518511
    dataset_size: 52487127
  - config_name: java-corpus
    features:
      - name: _id
        dtype: string
      - name: title
        dtype: string
      - name: partition
        dtype: string
      - name: text
        dtype: string
      - name: language
        dtype: string
      - name: meta_information
        struct:
          - name: resource
            dtype: string
    splits:
      - name: corpus
        num_bytes: 52844259
        num_examples: 181061
    download_size: 20139955
    dataset_size: 52844259
  - config_name: java-qrels
    features:
      - name: query-id
        dtype: string
      - name: corpus-id
        dtype: string
      - name: score
        dtype: int64
    splits:
      - name: train
        num_bytes: 4725470
        num_examples: 164923
      - name: valid
        num_bytes: 155490
        num_examples: 5183
      - name: test
        num_bytes: 328650
        num_examples: 10955
    download_size: 2059850
    dataset_size: 5209610
  - config_name: java-queries
    features:
      - name: _id
        dtype: string
      - name: title
        dtype: string
      - name: partition
        dtype: string
      - name: text
        dtype: string
      - name: language
        dtype: string
      - name: meta_information
        struct:
          - name: resource
            dtype: string
    splits:
      - name: queries
        num_bytes: 76773974
        num_examples: 181061
    download_size: 29677644
    dataset_size: 76773974
  - config_name: javascript-corpus
    features:
      - name: _id
        dtype: string
      - name: title
        dtype: string
      - name: partition
        dtype: string
      - name: text
        dtype: string
      - name: language
        dtype: string
      - name: meta_information
        struct:
          - name: resource
            dtype: string
    splits:
      - name: corpus
        num_bytes: 20940791
        num_examples: 65201
    download_size: 9148280
    dataset_size: 20940791
  - config_name: javascript-qrels
    features:
      - name: query-id
        dtype: string
      - name: corpus-id
        dtype: string
      - name: score
        dtype: int64
    splits:
      - name: train
        num_bytes: 1602480
        num_examples: 58025
      - name: valid
        num_bytes: 108780
        num_examples: 3885
      - name: test
        num_bytes: 92148
        num_examples: 3291
    download_size: 743674
    dataset_size: 1803408
  - config_name: javascript-queries
    features:
      - name: _id
        dtype: string
      - name: title
        dtype: string
      - name: partition
        dtype: string
      - name: text
        dtype: string
      - name: language
        dtype: string
      - name: meta_information
        struct:
          - name: resource
            dtype: string
    splits:
      - name: queries
        num_bytes: 28240438
        num_examples: 65201
    download_size: 12144058
    dataset_size: 28240438
  - config_name: php-corpus
    features:
      - name: _id
        dtype: string
      - name: title
        dtype: string
      - name: partition
        dtype: string
      - name: text
        dtype: string
      - name: language
        dtype: string
      - name: meta_information
        struct:
          - name: resource
            dtype: string
    splits:
      - name: corpus
        num_bytes: 75580225
        num_examples: 268237
    download_size: 28610118
    dataset_size: 75580225
  - config_name: php-qrels
    features:
      - name: query-id
        dtype: string
      - name: corpus-id
        dtype: string
      - name: score
        dtype: int64
    splits:
      - name: train
        num_bytes: 7015010
        num_examples: 241241
      - name: valid
        num_bytes: 389460
        num_examples: 12982
      - name: test
        num_bytes: 420420
        num_examples: 14014
    download_size: 3053262
    dataset_size: 7824890
  - config_name: php-queries
    features:
      - name: _id
        dtype: string
      - name: title
        dtype: string
      - name: partition
        dtype: string
      - name: text
        dtype: string
      - name: language
        dtype: string
      - name: meta_information
        struct:
          - name: resource
            dtype: string
    splits:
      - name: queries
        num_bytes: 108819401
        num_examples: 268237
    download_size: 41855424
    dataset_size: 108819401
  - config_name: python-corpus
    features:
      - name: _id
        dtype: string
      - name: title
        dtype: string
      - name: partition
        dtype: string
      - name: text
        dtype: string
      - name: language
        dtype: string
      - name: meta_information
        struct:
          - name: resource
            dtype: string
    splits:
      - name: corpus
        num_bytes: 114964501
        num_examples: 280652
    download_size: 45683292
    dataset_size: 114964501
  - config_name: python-qrels
    features:
      - name: query-id
        dtype: string
      - name: corpus-id
        dtype: string
      - name: score
        dtype: int64
    splits:
      - name: train
        num_bytes: 7332380
        num_examples: 251820
      - name: valid
        num_bytes: 417420
        num_examples: 13914
      - name: test
        num_bytes: 447540
        num_examples: 14918
    download_size: 3193423
    dataset_size: 8197340
  - config_name: python-queries
    features:
      - name: _id
        dtype: string
      - name: title
        dtype: string
      - name: partition
        dtype: string
      - name: text
        dtype: string
      - name: language
        dtype: string
      - name: meta_information
        struct:
          - name: resource
            dtype: string
    splits:
      - name: queries
        num_bytes: 164228951
        num_examples: 280652
    download_size: 68811755
    dataset_size: 164228951
  - config_name: ruby-corpus
    features:
      - name: _id
        dtype: string
      - name: title
        dtype: string
      - name: partition
        dtype: string
      - name: text
        dtype: string
      - name: language
        dtype: string
      - name: meta_information
        struct:
          - name: resource
            dtype: string
    splits:
      - name: corpus
        num_bytes: 6074846
        num_examples: 27588
    download_size: 2609576
    dataset_size: 6074846
  - config_name: ruby-qrels
    features:
      - name: query-id
        dtype: string
      - name: corpus-id
        dtype: string
      - name: score
        dtype: int64
    splits:
      - name: train
        num_bytes: 675736
        num_examples: 24927
      - name: valid
        num_bytes: 39200
        num_examples: 1400
      - name: test
        num_bytes: 35308
        num_examples: 1261
    download_size: 316849
    dataset_size: 750244
  - config_name: ruby-queries
    features:
      - name: _id
        dtype: string
      - name: title
        dtype: string
      - name: partition
        dtype: string
      - name: text
        dtype: string
      - name: language
        dtype: string
      - name: meta_information
        struct:
          - name: resource
            dtype: string
    splits:
      - name: queries
        num_bytes: 8891575
        num_examples: 27588
    download_size: 3948111
    dataset_size: 8891575
configs:
  - config_name: corpus
    data_files:
      - split: corpus
        path: corpus/corpus-*
  - config_name: go-corpus
    data_files:
      - split: corpus
        path: go-corpus/corpus-*
  - config_name: go-qrels
    data_files:
      - split: train
        path: go-qrels/train-*
      - split: valid
        path: go-qrels/valid-*
      - split: test
        path: go-qrels/test-*
  - config_name: go-queries
    data_files:
      - split: queries
        path: go-queries/queries-*
  - config_name: java-corpus
    data_files:
      - split: corpus
        path: java-corpus/corpus-*
  - config_name: java-qrels
    data_files:
      - split: train
        path: java-qrels/train-*
      - split: valid
        path: java-qrels/valid-*
      - split: test
        path: java-qrels/test-*
  - config_name: java-queries
    data_files:
      - split: queries
        path: java-queries/queries-*
  - config_name: javascript-corpus
    data_files:
      - split: corpus
        path: javascript-corpus/corpus-*
  - config_name: javascript-qrels
    data_files:
      - split: train
        path: javascript-qrels/train-*
      - split: valid
        path: javascript-qrels/valid-*
      - split: test
        path: javascript-qrels/test-*
  - config_name: javascript-queries
    data_files:
      - split: queries
        path: javascript-queries/queries-*
  - config_name: php-corpus
    data_files:
      - split: corpus
        path: php-corpus/corpus-*
  - config_name: php-qrels
    data_files:
      - split: train
        path: php-qrels/train-*
      - split: valid
        path: php-qrels/valid-*
      - split: test
        path: php-qrels/test-*
  - config_name: php-queries
    data_files:
      - split: queries
        path: php-queries/queries-*
  - config_name: python-corpus
    data_files:
      - split: corpus
        path: python-corpus/corpus-*
  - config_name: python-qrels
    data_files:
      - split: train
        path: python-qrels/train-*
      - split: valid
        path: python-qrels/valid-*
      - split: test
        path: python-qrels/test-*
  - config_name: python-queries
    data_files:
      - split: queries
        path: python-queries/queries-*
  - config_name: ruby-corpus
    data_files:
      - split: corpus
        path: ruby-corpus/corpus-*
  - config_name: ruby-qrels
    data_files:
      - split: train
        path: ruby-qrels/train-*
      - split: valid
        path: ruby-qrels/valid-*
      - split: test
        path: ruby-qrels/test-*
  - config_name: ruby-queries
    data_files:
      - split: queries
        path: ruby-queries/queries-*

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

import mteb
import logging
from sentence_transformers import SentenceTransformer
from mteb import MTEB

logger = logging.getLogger(__name__)

model_name = 'intfloat/e5-base-v2'
model = SentenceTransformer(model_name)
tasks = mteb.get_tasks(
    tasks=[
        "AppsRetrieval",
        "CodeFeedbackMT",
        "CodeFeedbackST",
        "CodeTransOceanContest",
        "CodeTransOceanDL",
        "CosQA",
        "SyntheticText2SQL",
        "StackOverflowQA",
        "COIRCodeSearchNetRetrieval",
        "CodeSearchNetCCRetrieval",
    ]
)
evaluation = MTEB(tasks=tasks)
results = evaluation.run(
    model=model,
    overwrite_results=True
)
print(result)

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

import mteb
import logging
from sentence_transformers import SentenceTransformer
from mteb import MTEB

logger = logging.getLogger(__name__)

model_name = 'intfloat/e5-base-v2'
model = SentenceTransformer(model_name)
tasks = mteb.get_tasks(
    tasks=[
        "AppsRetrieval",
        "CodeFeedbackMT",
        "CodeFeedbackST",
        "CodeTransOceanContest",
        "CodeTransOceanDL",
        "CosQA",
        "SyntheticText2SQL",
        "StackOverflowQA",
        "COIRCodeSearchNetRetrieval",
        "CodeSearchNetCCRetrieval",
    ]
)
evaluation = MTEB(tasks=tasks)
results = evaluation.run(
    model=model,
    overwrite_results=True
)
print(result)