CoolFace
Datasetpublic

anon-iclr-submission/benchname-project-level-code-completion

πŸ₯· BenchName (Project-level code completion) This is the benchmark for Project-level code completion task as part of the πŸ₯· BenchName benchmark. Each datapoint contains the file for completion, a list of lines to complete with their categories (see the categorization below), and a repository snapshot that can be used to build the context. All the repositories are published under permissive licenses (MIT, Apache-2.0, BSD-3-Clause, and BSD-2-Clause). The datapoints can be removed… See the full description on the dataset page: https://huggingface.co/datasets/anon-iclr-submission/benchname-project-level-code-completion.

sourceHugging Faceapache-2.0updated 1y agoView on Hugging Face
0likes169downloads
Dataset Card

πŸ₯· BenchName (Project-level code completion)

This is the benchmark for Project-level code completion task as part of the πŸ₯· BenchName benchmark. Each datapoint contains the file for completion, a list of lines to complete with their categories (see the categorization below), and a repository snapshot that can be used to build the context. All the repositories are published under permissive licenses (MIT, Apache-2.0, BSD-3-Clause, and BSD-2-Clause). The datapoints can be removed upon request.

How-to

Load the data via load_dataset:

from datasets import load_dataset

config_names = [
  'small_context',
  'medium_context',
  'large_context',
  'huge_context'
]

ds = load_dataset('anon-iclr-submission/benchname-project-level-code-completion', config_name, split='test')

Dataset Structure

Datapoints in the dataset have the following structure:

  • β€”repo – repository name in the format {GitHub_user_name}__{repository_name}
  • β€”commit_hash – commit hash of the repository
  • β€”completion_file – dictionary with the completion file content in the following format:
  • β€”filename – path to the completion file
  • β€”content – content of the completion file
  • β€”completion_lines – dictionary where the keys are categories of lines and values are a list of integers (numbers of lines to complete). The categories are:
  • β€”committed – line contains at least one function or class from the files that were added on the completion file commit
  • β€”inproject – line contains at least one function or class from the repository snapshot at the moment of completion
  • β€”infile – line contains at least one function or class from the completion file
  • β€”common – line contains at least one function or class with common names, e.g., main, get, etc.
  • β€”non_informative – line that was classified to be non-informative, e.g., too short, contains comments, etc.
  • β€”random – other lines.
  • β€”repo_snapshot – dictionary with a snapshot of the repository before the commit. It has the same structure as completion_file, but filenames and contents are orginized as lists.
  • β€”completion_lines_raw – same as completion_lines, but before sampling

How we collected the data

To collect the data, we cloned repositories from GitHub where the main language is Python. The completion file for each datapoint is a .py file that was added to the repository in a commit. The state of the repository before this commit is the repo snapshot.

The dataset configurations are based on the number of characters in .py files from the repository snapshot:

  • β€”small_context – less than 48K characters;
  • β€”medium_context – from 48K to 192K characters;
  • β€”large_context – from 192K to 768K characters;
  • β€”huge_context – more than 768K characters.

Datasets Stats

DatasetNumber of datapointsNumber of repositoriesNumber of commits
small_context1444663
medium_context22480175
large_context27075219
huge_context29675252

Completion File

DatasetCompletion file lines, minCompletion file lines, maxCompletion file lines, median
small_context2011916310.5
medium_context2001648310.0
large_context2001694278.0
huge_context2001877313.5

Repository Snapshot .py files

DatasetContext py files number, minContext py files number, maxContext py files number, medianContext py lines, median
small_context0524.0128.0
medium_context311734.03786.0
large_context325584.015466.5
huge_context475227261.049811.0

Repository Snapshot non .py files

DatasetContext non-py files number, minContext non-py files number, maxContext non-py files number, medianContext non-py lines, median
small_context1104419.51227.0
medium_context3397764.59735.0
large_context82174155.018759.0
huge_context247687262.060163.0

Line Counts:

Dataset*infile**inproject**common**commited**non-informative**random***all**
small_context14309550014265327034686
medium_context22242236779149585810848676
large_context269125956931322101913119631
huge_context260829016921019116414269810

Scores

You can find the results of running various models on this dataset in our leaderboard.