File size: 2,563 Bytes
9c28a5b
 
 
 
 
 
 
 
 
 
 
bff98af
 
aee6367
 
9c28a5b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
aee6367
 
bff98af
 
 
 
 
 
 
 
 
 
9c28a5b
 
bff98af
 
 
 
9c28a5b
 
 
 
 
 
6644a65
 
 
 
 
 
 
 
 
 
 
 
 
58195d5
6644a65
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
---
dataset_info:
  features:
  - name: instance_id
    dtype: string
  - name: repo
    dtype: string
  - name: base_commit
    dtype: string
  - name: patch
    dtype: string
  - name: language
    dtype: string
  - name: non_code_patch
    dtype: string
  - name: test_patch
    dtype: string
  - name: created_at
    dtype: string
  - name: problem_statement
    dtype: string
  - name: hints_text
    dtype: string
  - name: version
    dtype: string
  - name: environment_setup_commit
    dtype: string
  - name: FAIL_TO_PASS
    dtype: string
  - name: PASS_TO_PASS
    dtype: string
  - name: FAIL_TO_FAIL
    dtype: string
  - name: license
    struct:
    - name: key
      dtype: string
    - name: name
      dtype: string
    - name: spdx_id
      dtype: string
    - name: url
      dtype: string
  splits:
  - name: train
    num_bytes: 90174137
    num_examples: 1000
  download_size: 30015778
  dataset_size: 90174137
configs:
- config_name: default
  data_files:
  - split: train
    path: data/train-*
---
# **Codeset-Gym-Python**

A gym for training code agents resolve real-world software issues. This version contains issues from Python repositories.

---

## Dataset Structure
| Column | Type | Description |
|-----|------|-------------|
| `instance_id` | `str` | Formatted as `owner__repo-issueNumber` (e.g. `psf__requests-6091`) |
| `repo` | `str` | `owner/repo` |
| `patch` | `str` | Source-code diff that resolves the issue *(tests omitted)* |
| `test_patch` | `str` | Diff of test files added/changed by the issue resolving commit  |
| `base_commit` | `str` | Commit hash *before* the issue resolution |
| `environment_setup_commit` | `str` | Commit hash of the resolved version, from which the environment was built |
| `created_at` | `str` | ISO timestamp of the issue resolving commit |
| `problem_statement` | `str` | Issue title + body |
| `hints_text` | `str` | Concatenated Issue comments prior to the patch |
| `version` | `str` | Environment version tags |
| `FAIL_TO_PASS` | `List[str]` | A json list of strings that represent the set of tests resolved by the PR and tied to the issue resolution. |
| `PASS_TO_PASS` | `List[str]` | A json list of strings that represent tests that should pass before and after the PR application. |
---

## Usage

```python
from datasets import load_dataset

ds = load_dataset("codeset/codeset-gym-python", split="train")

sample = ds[0]
print(sample["problem_statement"])
print(sample["patch"])
```

The dataset ships as a single `train` split.

---

Built by [Codeset](https://codeset.ai/)