Update README
Browse files
README.md
CHANGED
@@ -686,7 +686,7 @@ This is a dataset of repository snapshots before a commit where a python file ha
|
|
686 |
from datasets import load_dataset
|
687 |
|
688 |
data_files = # choose from the table below
|
689 |
-
dataset = load_dataset("
|
690 |
```
|
691 |
|
692 |
#### Options for `data_files`:
|
@@ -700,3 +700,12 @@ This is a dataset of repository snapshots before a commit where a python file ha
|
|
700 |
| **file length composer** | data/file_length_composer/all_context/test-* | data/file_length_composer/non_py_context/test-* | data/file_length_composer/py_context/test-* |
|
701 |
| **half memory composer** | data/half_memory_composer/all_context/test-* | data/half_memory_composer/non_py_context/test-* | data/half_memory_composer/py_context/test-* |
|
702 |
| **function class mask one composer** | data/function_class_mask_one_composer/all_context/test-* | data/function_class_mask_one_composer/non_py_context/test-* | data/function_class_mask_one_composer/py_context/test-* |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
686 |
from datasets import load_dataset
|
687 |
|
688 |
data_files = # choose from the table below
|
689 |
+
dataset = load_dataset("jenyag/repo-code-completion", data_files=data_files, split="train")
|
690 |
```
|
691 |
|
692 |
#### Options for `data_files`:
|
|
|
700 |
| **file length composer** | data/file_length_composer/all_context/test-* | data/file_length_composer/non_py_context/test-* | data/file_length_composer/py_context/test-* |
|
701 |
| **half memory composer** | data/half_memory_composer/all_context/test-* | data/half_memory_composer/non_py_context/test-* | data/half_memory_composer/py_context/test-* |
|
702 |
| **function class mask one composer** | data/function_class_mask_one_composer/all_context/test-* | data/function_class_mask_one_composer/non_py_context/test-* | data/function_class_mask_one_composer/py_context/test-* |
|
703 |
+
|
704 |
+
## How to get the full context for the specific line
|
705 |
+
```
|
706 |
+
for datapoint in dataset:
|
707 |
+
project_context = datapoint['project_context'] # The project context may be quite long
|
708 |
+
for file_context_dict, ground_truth in zip(datapoint['file_context'], datapoint['gt']):
|
709 |
+
file_context = file_context_dict['content']
|
710 |
+
full_context = project_context + file_context
|
711 |
+
```
|