Datasets:
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,29 +1,123 @@
|
|
| 1 |
---
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
-
|
| 5 |
-
|
| 6 |
-
-
|
| 7 |
-
|
| 8 |
-
-
|
| 9 |
-
|
| 10 |
-
- name: task_config
|
| 11 |
-
dtype: string
|
| 12 |
-
- name: goal
|
| 13 |
-
dtype: string
|
| 14 |
-
- name: start_url
|
| 15 |
-
dtype: string
|
| 16 |
-
- name: validation
|
| 17 |
-
dtype: string
|
| 18 |
-
splits:
|
| 19 |
-
- name: train
|
| 20 |
-
num_bytes: 376685
|
| 21 |
-
num_examples: 155
|
| 22 |
-
download_size: 33758
|
| 23 |
-
dataset_size: 376685
|
| 24 |
-
configs:
|
| 25 |
-
- config_name: default
|
| 26 |
-
data_files:
|
| 27 |
-
- split: train
|
| 28 |
-
path: data/train-*
|
| 29 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- text-generation
|
| 5 |
+
tags:
|
| 6 |
+
- web-agent
|
| 7 |
+
- evaluation
|
| 8 |
+
- gitlab
|
| 9 |
+
pretty_name: GitLab Tasks
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
---
|
| 11 |
+
|
| 12 |
+
# GitLab Tasks
|
| 13 |
+
|
| 14 |
+
An evaluation dataset for web agents operating on a self-hosted GitLab instance. Each row contains a task goal, a configuration dict, and a standalone Python validation function that scores agent performance by querying the GitLab API.
|
| 15 |
+
|
| 16 |
+
## Dataset overview
|
| 17 |
+
|
| 18 |
+
- **155 samples** across **23 task categories**
|
| 19 |
+
- Validators are self-contained Python functions that call the GitLab REST API to verify outcomes
|
| 20 |
+
|
| 21 |
+
| Category | Samples | Description |
|
| 22 |
+
|---|---|---|
|
| 23 |
+
| `add-followed-users-to-new-repo` | 3 | Follow users, create a group, create a project, and add them as collaborators |
|
| 24 |
+
| `create-group` | 5 | Create a group and add members |
|
| 25 |
+
| `create-issue` | 13 | Create an issue in a repository |
|
| 26 |
+
| `create-milestone` | 5 | Create a milestone with start and end dates |
|
| 27 |
+
| `create-pr` | 6 | Create a merge request between branches |
|
| 28 |
+
| `create-repo` | 20 | Create a new project with visibility and member settings |
|
| 29 |
+
| `follow-user` | 5 | Follow one or more users |
|
| 30 |
+
| `fork-repo` | 6 | Fork a repository |
|
| 31 |
+
| `get-and-update-info` | 3 | Update status and profile, then report repository contributions |
|
| 32 |
+
| `invite-user` | 15 | Invite a user to a repository with a specific role |
|
| 33 |
+
| `list-issues` | 12 | List issues matching specific filters |
|
| 34 |
+
| `list-pr` | 2 | List merge requests matching specific filters |
|
| 35 |
+
| `list-repos` | 6 | List repositories matching criteria |
|
| 36 |
+
| `open-issue` | 10 | Find and open a specific existing issue |
|
| 37 |
+
| `post-message` | 8 | Post a comment on a merge request |
|
| 38 |
+
| `show-command` | 5 | Show the git clone command for a repository |
|
| 39 |
+
| `star-fork-create-milestone-issues` | 3 | Star and fork a repo, create a milestone, and create issues |
|
| 40 |
+
| `star-repo` | 5 | Star the top N most-starred repositories |
|
| 41 |
+
| `update-issue` | 5 | Assign an issue to a user |
|
| 42 |
+
| `update-license` | 5 | Change a repository's license |
|
| 43 |
+
| `update-multiple-issues-single-repo` | 3 | Add comments to multiple issues in a repository |
|
| 44 |
+
| `update-profile` | 5 | Update the user's profile homepage URL |
|
| 45 |
+
| `update-status` | 5 | Set the user's GitLab status |
|
| 46 |
+
|
| 47 |
+
## Schema
|
| 48 |
+
|
| 49 |
+
| Column | Type | Description |
|
| 50 |
+
|---|---|---|
|
| 51 |
+
| `benchmark` | `string` | Benchmark name (`gitlab`) |
|
| 52 |
+
| `task_name` | `string` | Task category (e.g. `gitlab.create-issue`) |
|
| 53 |
+
| `task_seed` | `int` | YAML file ID the sample was generated from |
|
| 54 |
+
| `task_config` | `string` | JSON-encoded dict with task-specific parameters used for validation |
|
| 55 |
+
| `goal` | `string` | Natural language instruction shown to the agent |
|
| 56 |
+
| `start_url` | `string` | URL where the agent should begin (empty, defaults to GitLab home) |
|
| 57 |
+
| `validation` | `string` | Python source code of the validator module |
|
| 58 |
+
|
| 59 |
+
## Validation
|
| 60 |
+
|
| 61 |
+
Each validator module exposes a `validate(messages, config)` function:
|
| 62 |
+
|
| 63 |
+
```python
|
| 64 |
+
def validate(messages: List[Dict[str, str]], config: Dict[str, Any]) -> int:
|
| 65 |
+
"""
|
| 66 |
+
Args:
|
| 67 |
+
messages: Conversation history (list of {"role": ..., "content": ...} dicts).
|
| 68 |
+
The last assistant message is checked for answer-based tasks.
|
| 69 |
+
config: The task_config dict for this sample.
|
| 70 |
+
|
| 71 |
+
Returns:
|
| 72 |
+
1 if the task was completed successfully, 0 otherwise.
|
| 73 |
+
|
| 74 |
+
Raises:
|
| 75 |
+
ValueError: If the task configuration is invalid.
|
| 76 |
+
"""
|
| 77 |
+
```
|
| 78 |
+
|
| 79 |
+
Validators call the GitLab REST API to verify outcomes. The following environment variables must be set:
|
| 80 |
+
|
| 81 |
+
| Variable | Description |
|
| 82 |
+
|---|---|
|
| 83 |
+
| `GITLAB_BASE_URL` | Base URL of the GitLab instance (e.g. `https://gitlab.example.com`) |
|
| 84 |
+
| `GITLAB_EXTRA_HTTP_HEADERS` | JSON string containing authentication headers (e.g. `{"Authorization": "Bearer <token>"}`) |
|
| 85 |
+
|
| 86 |
+
### Usage
|
| 87 |
+
|
| 88 |
+
```python
|
| 89 |
+
import ast
|
| 90 |
+
from datasets import load_dataset
|
| 91 |
+
|
| 92 |
+
ds = load_dataset("servicenow-ai/gitlab-tasks")
|
| 93 |
+
|
| 94 |
+
sample = ds["train"][0]
|
| 95 |
+
config = ast.literal_eval(sample["task_config"])
|
| 96 |
+
|
| 97 |
+
# Load the validator
|
| 98 |
+
exec(sample["validation"], globals())
|
| 99 |
+
score = validate(
|
| 100 |
+
messages=[{"role": "assistant", "content": "Done."}],
|
| 101 |
+
config=config,
|
| 102 |
+
)
|
| 103 |
+
```
|
| 104 |
+
|
| 105 |
+
## Task categories
|
| 106 |
+
|
| 107 |
+
### Single-action tasks
|
| 108 |
+
- **create-group** / **create-repo** / **create-issue** / **create-milestone** / **create-pr**: Create a GitLab resource with specific attributes. Validated by querying the API for the created resource.
|
| 109 |
+
- **follow-user** / **fork-repo** / **star-repo**: Social actions on users or repositories. Validated by checking the user's following list, fork list, or starred projects.
|
| 110 |
+
- **invite-user**: Invite a user to a project with a specific access level. Validated by checking project membership.
|
| 111 |
+
- **update-issue** / **update-license** / **update-profile** / **update-status**: Modify an existing resource. Validated by reading back the resource state from the API.
|
| 112 |
+
- **post-message**: Post a comment on a merge request. Validated by fetching the MR's notes.
|
| 113 |
+
|
| 114 |
+
### Information retrieval tasks
|
| 115 |
+
- **list-issues** / **list-pr** / **list-repos**: The agent must return a URL with the correct query parameters. Validated by checking the URL prefix and query string.
|
| 116 |
+
- **open-issue**: Find and navigate to a specific issue. Validated by matching the URL against the API's issue reference.
|
| 117 |
+
- **show-command**: Return the SSH clone command for a repository. Validated by comparing against the API's `ssh_url_to_repo`.
|
| 118 |
+
|
| 119 |
+
### Multi-step tasks
|
| 120 |
+
- **add-followed-users-to-new-repo**: Follow users, create a group, create a project, and add collaborators. Validated by checking all sub-tasks via the API.
|
| 121 |
+
- **get-and-update-info**: Update status and profile, then report repository contributions. Validated by checking status, profile URL, and message content.
|
| 122 |
+
- **star-fork-create-milestone-issues**: Star a repo, fork it, create a milestone, and create issues. Validated by checking all sub-tasks via the API.
|
| 123 |
+
- **update-multiple-issues-single-repo**: Add comments to multiple issues. Validated by checking issue notes.
|