You need to agree to share your contact information to access this dataset
This repository is publicly accessible, but you have to accept the conditions to access its files and content.
Terms of Use for The Stack
The Stack dataset is a collection of source code in over 300 programming languages. We ask that you read and acknowledge the following points before using the dataset:
- The Stack is a collection of source code from repositories with various licenses. Any use of all or part of the code gathered in The Stack must abide by the terms of the original licenses, including attribution clauses when relevant. We facilitate this by providing provenance information for each data point.
- The Stack is regularly updated to enact validated data removal requests. By clicking on "Access repository", you agree to update your own version of The Stack to the most recent usable version specified by the maintainers in the following thread. If you have questions about dataset versions and allowed uses, please also ask them in the dataset’s community discussions. We will also notify users via email when the latest usable version changes.
- To host, share, or otherwise provide access to The Stack dataset, you must include these Terms of Use and require users to agree to it.
By clicking on "Access repository" below, you accept that your contact information (email address and username) can be shared with the dataset maintainers as well.
Log in or Sign Up to review the conditions and access this dataset content.
Dataset Card for "ts-eval"
This is a dataset of 744 high-quality TypeScript files, meant for evaluation of type prediction systems. The dataset is derived from TypeScript portion of The Stack (dedup), version 1.1, and filtered.
Filtering steps
We remove files that:
- Depend on external modules and do not type check.
- Have 0 type annotation locations.
- Have 50 or fewer lines of code.
- Have 0 functions.
- Average fewer than 5 lines of code per function.
Next, we compute a weighted quality score, based on the following factors:
- function annotation density
- variable annotation density
- type definition density
- trivial types density
- predefined types density
- lines of code per function
- number of function usages
Files with a score 1 or more standard deviations below the mean are removed.
Next, we apply the training cutoff (December 31, 2021).
Finally, we remove type annotations. Some files become invalid during this process, so we exclude them from the dataset.
Data fields
Most of the data fields come from The Stack.
We add the following fields:
loc
(integer): lines of code, excluding comments and blanksfunctions
(integer): number of functions that have function bodies; includes function expressions, arrow functions, and methodsfunction_signatures
(integer): number of function signatures, i.e., function declarations with no bodiesfunction_parameters
(integer): number of function parametersvariable_declarations
(integer): number of variable declarationsproperty_declarations
(integer): number of property declarations, i.e., within classes and interfacesfunction_usages
(integer): number of functions (defined within the file) that are calledtrivial_types
(integer): number of trivial type annotations, e.g.any
,Function
predefined_types
(integer): number of predefined type annotations, e.g.boolean
,number
,string
type_definitions
(integer): number of type definitions, e.g. classes, interfaces, type aliasesdynamism_heuristic
(integer): a count of dynamic language features, e.g.eval
, run-time type testsloc_per_function
(float): average lines of code per functionestimated_tokens
(integer): estimated token count, using the SantaCoder tokenizerfun_ann_density
(float): a measure of function annotation densityvar_ann_density
(float): a measure of variable annotation densityprop_ann_density
(float): a measure of property annotation densitytypedef_density
(float): a measure of type definition densitydynamism_density
(float): a measure of dynamic feature usage densitytrivial_density
(float): a measure of trivial type annotation densitypredefined_density
(float): a measure of predefined type annotation densitymetric
(float): the quality scorecontent_without_annotations
(string): content of the file, with type annotations removed
Versions
The default version (main
) is v1.1
.
Version | Description |
---|---|
v1.1 |
Original version of the evaluation dataset, based on v1.1 of the Stack. Applies the training cutoff (December 31, 2021). |
v1.1full |
Evaluation dataset, based on v1.1 of the Stack. Does not apply the training cutoff. |
v1.1subset |
A subset of v1.1 containing only 50 files. |
- Downloads last month
- 38