Update README.md
Browse files
README.md
CHANGED
@@ -55,16 +55,15 @@ configs:
|
|
55 |
path: kaggle/train-*
|
56 |
---
|
57 |
|
58 |
-
#
|
59 |
## Description
|
60 |
-
|
61 |
|
62 |
-
The dataset includes
|
63 |
|
64 |
-
- ๐ GitHub Issues โ 11B tokens of
|
65 |
-
- ๐ Kaggle Notebooks โ
|
66 |
-
|
67 |
-
These subsets have undergone filtering to remove low-quality content, duplicates, more details in StarCoder2 [paper](https://arxiv.org/abs/2402.19173)
|
68 |
|
69 |
## How to load the dataset
|
70 |
|
@@ -73,13 +72,12 @@ You can load a specific subset using the following code:
|
|
73 |
```python
|
74 |
from datasets import load_dataset
|
75 |
|
76 |
-
|
77 |
-
|
78 |
-
data = load_dataset("HuggingFaceTB/github-issues-notebooks", "jupyter", split="train") # Jupyter Notebooks
|
79 |
```
|
80 |
|
81 |
## Dataset curation
|
82 |
-
These curation details are from the SterCoder2 pipeline. The original datasets can be found at: https://huggingface.co/datasets/bigcode/starcoder2data-extras
|
83 |
|
84 |
### ๐ GitHub Issues
|
85 |
The GitHub Issues dataset consists of discussions from GitHub repositories, sourced from GHArchive. It contains issue reports, bug tracking, and technical Q&A discussions.
|
@@ -89,20 +87,92 @@ To ensure high-quality data, the StarCoder2 processing pipeline included:
|
|
89 |
- Removing bot-generated comments and auto-replies from email responses.
|
90 |
- Filtering out short issues (<200 characters) and extremely long comments.
|
91 |
- Keeping only discussions with multiple users (or highly detailed single-user reports).
|
92 |
-
- Anonymizing usernames while preserving the conversation structure.
|
93 |
-
- This cleaning process removed 38% of issues, ensuring a high-quality dataset with technical depth.
|
94 |
-
- More details can be found in the StarCoder2 paper.
|
95 |
|
96 |
-
|
97 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
98 |
|
99 |
## ๐ Kaggle Notebooks
|
100 |
The Kaggle Notebooks are sourced from the [Meta Kaggle Code](https://www.kaggle.com/datasets/kaggle/meta-kaggle-code) dataset. They were cleaned using a multi-step filtering process, which included:
|
101 |
|
102 |
- Removing notebooks with syntax errors or less than 100 characters.
|
103 |
-
- Extracting metadata for notebooks that reference Kaggle datasets
|
104 |
-
- Filtering out duplicates, which reduced the dataset volume by 78
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
105 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
|
107 |
## Citation
|
108 |
```
|
|
|
55 |
path: kaggle/train-*
|
56 |
---
|
57 |
|
58 |
+
# GitHub Issues & Kaggle Notebooks
|
59 |
## Description
|
60 |
+
GitHub Issues & Kaggle Notebooks is a collection of two code datasets intended for language models training, they are sourced from GitHub issues and notebooks in Kaggle platform. These datasets are a modified part of the [StarCoder2](https://arxiv.org/abs/2402.19173) model training corpus, precisely the [bigcode/StarCoder2-Extras](https://huggingface.co/datasets/bigcode/starcoder2data-extras) dataset. We reformat the samples to remove StarCoder2's special tokens and use natural text to delimit comments in issues and display kaggle notebooks in markdown and code blocks.
|
61 |
|
62 |
+
The dataset includes:
|
63 |
|
64 |
+
- ๐ GitHub Issues โ 11B tokens of discussions from GitHub issues sourced from [GH Archive](https://www.gharchive.org/).
|
65 |
+
- ๐ Kaggle Notebooks โ 1.7B tokens of data analysis notebooks in markdonw format, curated from Kaggle's [Meta Kaggle Code](https://www.kaggle.com/datasets/kaggle/meta-kaggle-code) dataset.
|
66 |
+
These datasets have undergone filtering to remove low-quality content, duplicates and PII. More details in StarCoder2 [paper](https://arxiv.org/abs/2402.19173)
|
|
|
67 |
|
68 |
## How to load the dataset
|
69 |
|
|
|
72 |
```python
|
73 |
from datasets import load_dataset
|
74 |
|
75 |
+
issues = load_dataset("HuggingFaceTB/github-issues-notebooks", "issues", split="train") # GitHub Issues
|
76 |
+
kaggle_notebooks = load_dataset("HuggingFaceTB/github-issues-notebooks", "kaggle", split="train") # Kaggle Notebooks
|
|
|
77 |
```
|
78 |
|
79 |
## Dataset curation
|
80 |
+
These curation details are from the SterCoder2 pipeline. The original datasets can be found at: https://huggingface.co/datasets/bigcode/starcoder2data-extras and more details can be found in the StarCoder2 paper.
|
81 |
|
82 |
### ๐ GitHub Issues
|
83 |
The GitHub Issues dataset consists of discussions from GitHub repositories, sourced from GHArchive. It contains issue reports, bug tracking, and technical Q&A discussions.
|
|
|
87 |
- Removing bot-generated comments and auto-replies from email responses.
|
88 |
- Filtering out short issues (<200 characters) and extremely long comments.
|
89 |
- Keeping only discussions with multiple users (or highly detailed single-user reports).
|
90 |
+
- Anonymizing usernames while preserving the conversation structure, names, emails, keys, passwords, IP addresses using [StarPII](https://huggingface.co/bigcode/starpii).
|
|
|
|
|
91 |
|
92 |
+
We format the conversatiosn using this template:
|
93 |
+
|
94 |
+
```
|
95 |
+
Title: [Issue title]
|
96 |
+
|
97 |
+
Question:
|
98 |
+
username_0: [Issue content]
|
99 |
+
|
100 |
+
Answers:
|
101 |
+
username_1: [Answer from user 1]
|
102 |
+
username_0: [Author reply]
|
103 |
+
username_2: [Answer from user 2]
|
104 |
+
...
|
105 |
+
Status: Issue closed (optional)
|
106 |
+
```
|
107 |
|
108 |
## ๐ Kaggle Notebooks
|
109 |
The Kaggle Notebooks are sourced from the [Meta Kaggle Code](https://www.kaggle.com/datasets/kaggle/meta-kaggle-code) dataset. They were cleaned using a multi-step filtering process, which included:
|
110 |
|
111 |
- Removing notebooks with syntax errors or less than 100 characters.
|
112 |
+
- Extracting metadata for notebooks that reference Kaggle datasets. When possible, we retrieve the datasets references in the notebook and add information about them to the beginning of the notebook (description, `ds.info()` output and 4 examples)
|
113 |
+
- Filtering out duplicates, which reduced the dataset volume by 78%, and redacting PII.
|
114 |
+
Each notebook is formatted in Markdown format, where we start with the notebook title, dataset description when available and put the notebook (converted to a Python script) in a code block.
|
115 |
+
|
116 |
+
Below is an example of a kaggle notebook:
|
117 |
+
|
118 |
+
````
|
119 |
+
# Iris Flower Dataset
|
120 |
+
|
121 |
+
### Context
|
122 |
+
The Iris flower data set is a multivariate data set introduced ... (truncated)
|
123 |
+
|
124 |
+
```python
|
125 |
+
import pandas as pd
|
126 |
|
127 |
+
df = pd.read_csv('iris-flower-dataset/IRIS.csv')
|
128 |
+
df.info()
|
129 |
+
```
|
130 |
+
```
|
131 |
+
<class 'pandas.core.frame.DataFrame'>
|
132 |
+
RangeIndex: 150 entries, 0 to 149
|
133 |
+
Data columns (total 5 columns):
|
134 |
+
# Column Non-Null Count Dtype
|
135 |
+
--- ------ -------------- -----
|
136 |
+
0 sepal_length 150 non-null float64
|
137 |
+
1 sepal_width 150 non-null float64
|
138 |
+
2 petal_length 150 non-null float64
|
139 |
+
3 petal_width 150 non-null float64
|
140 |
+
4 species 150 non-null object
|
141 |
+
dtypes: float64(4), object(1)
|
142 |
+
memory usage: 6.0+ KB
|
143 |
+
```
|
144 |
+
|
145 |
+
Examples from the dataset:
|
146 |
+
```
|
147 |
+
{
|
148 |
+
"sepal_length": 5.1,
|
149 |
+
"sepal_width": 3.5,
|
150 |
+
"petal_length": 1.4,
|
151 |
+
"petal_width": 0.2,
|
152 |
+
"species": "Iris-setosa"
|
153 |
+
}
|
154 |
+
... (truncated)
|
155 |
+
```
|
156 |
+
|
157 |
+
Code:
|
158 |
+
```python
|
159 |
+
import numpy as np # linear algebra
|
160 |
+
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
|
161 |
+
|
162 |
+
# Input data files are available in the read-only "../input/" directory
|
163 |
+
import os
|
164 |
+
|
165 |
+
for dirname, _, filenames in os.walk("/kaggle/input"):
|
166 |
+
for filename in filenames:
|
167 |
+
print(os.path.join(dirname, filename))
|
168 |
+
# You can also write temporary files to /kaggle/temp/, but they won't be saved outside of the current session
|
169 |
+
import matplotlib.pyplot as plt
|
170 |
+
|
171 |
+
data = pd.read_csv("/kaggle/input/iris-flower-dataset/IRIS.csv")
|
172 |
+
data.head()
|
173 |
+
X = data.drop("species", axis=1)
|
174 |
+
... (truncated)
|
175 |
+
````
|
176 |
|
177 |
## Citation
|
178 |
```
|