Datasets:
|
Download README.md from ServiceNow-AI/gitlab-tasks: direct link, hf CLI and curl.
- Browser
- Download file 6.41 kB
-
https://huggingface.co/datasets/ServiceNow-AI/gitlab-tasks/resolve/main/README.md
- Command line
-
hf download hf://datasets/ServiceNow-AI/gitlab-tasks/README.md
-
curl -L -o README.md https://huggingface.co/datasets/ServiceNow-AI/gitlab-tasks/resolve/main/README.md
6.41 kB
| license: apache-2.0 | |
| task_categories: | |
| - text-generation | |
| tags: | |
| - web-agent | |
| - evaluation | |
| - gitlab | |
| pretty_name: GitLab Tasks | |
| dataset_info: | |
| features: | |
| - name: benchmark | |
| dtype: string | |
| - name: task_name | |
| dtype: string | |
| - name: task_seed | |
| dtype: int64 | |
| - name: task_config | |
| dtype: string | |
| - name: goal | |
| dtype: string | |
| - name: start_url | |
| dtype: string | |
| - name: validation | |
| dtype: string | |
| splits: | |
| - name: train | |
| num_bytes: 806672 | |
| num_examples: 192 | |
| download_size: 57836 | |
| dataset_size: 806672 | |
| configs: | |
| - config_name: default | |
| data_files: | |
| - split: train | |
| path: data/train-* | |
| # GitLab Tasks | |
| 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. | |
| ## Dataset overview | |
| - **155 samples** across **23 task categories** | |
| - Validators are self-contained Python functions that call the GitLab REST API to verify outcomes | |
| | Category | Samples | Description | | |
| |---|---|---| | |
| | `add-followed-users-to-new-repo` | 3 | Follow users, create a group, create a project, and add them as collaborators | | |
| | `create-group` | 5 | Create a group and add members | | |
| | `create-issue` | 13 | Create an issue in a repository | | |
| | `create-milestone` | 5 | Create a milestone with start and end dates | | |
| | `create-pr` | 6 | Create a merge request between branches | | |
| | `create-repo` | 20 | Create a new project with visibility and member settings | | |
| | `follow-user` | 5 | Follow one or more users | | |
| | `fork-repo` | 6 | Fork a repository | | |
| | `get-and-update-info` | 3 | Update status and profile, then report repository contributions | | |
| | `invite-user` | 15 | Invite a user to a repository with a specific role | | |
| | `list-issues` | 12 | List issues matching specific filters | | |
| | `list-pr` | 2 | List merge requests matching specific filters | | |
| | `list-repos` | 6 | List repositories matching criteria | | |
| | `open-issue` | 10 | Find and open a specific existing issue | | |
| | `post-message` | 8 | Post a comment on a merge request | | |
| | `show-command` | 5 | Show the git clone command for a repository | | |
| | `star-fork-create-milestone-issues` | 3 | Star and fork a repo, create a milestone, and create issues | | |
| | `star-repo` | 5 | Star the top N most-starred repositories | | |
| | `update-issue` | 5 | Assign an issue to a user | | |
| | `update-license` | 5 | Change a repository's license | | |
| | `update-multiple-issues-single-repo` | 3 | Add comments to multiple issues in a repository | | |
| | `update-profile` | 5 | Update the user's profile homepage URL | | |
| | `update-status` | 5 | Set the user's GitLab status | | |
| ## Schema | |
| | Column | Type | Description | | |
| |---|---|---| | |
| | `benchmark` | `string` | Benchmark name (`gitlab`) | | |
| | `task_name` | `string` | Task category (e.g. `gitlab.create-issue`) | | |
| | `task_seed` | `int` | YAML file ID the sample was generated from | | |
| | `task_config` | `string` | JSON-encoded dict with task-specific parameters used for validation | | |
| | `goal` | `string` | Natural language instruction shown to the agent | | |
| | `start_url` | `string` | URL where the agent should begin (empty, defaults to GitLab home) | | |
| | `validation` | `string` | Python source code of the validator module | | |
| ## Validation | |
| Each validator module exposes a `validate(messages, config)` function: | |
| ```python | |
| def validate(messages: List[Dict[str, str]], config: Dict[str, Any]) -> int: | |
| """ | |
| Args: | |
| messages: Conversation history (list of {"role": ..., "content": ...} dicts). | |
| The last assistant message is checked for answer-based tasks. | |
| config: The task_config dict for this sample. | |
| Returns: | |
| 1 if the task was completed successfully, 0 otherwise. | |
| Raises: | |
| ValueError: If the task configuration is invalid. | |
| """ | |
| ``` | |
| Validators call the GitLab REST API to verify outcomes. The following environment variables must be set: | |
| | Variable | Description | | |
| |---|---| | |
| | `GITLAB_BASE_URL` | Base URL of the GitLab instance (e.g. `https://gitlab.example.com`) | | |
| | `GITLAB_EXTRA_HTTP_HEADERS` | JSON string containing authentication headers (e.g. `{"Authorization": "Bearer <token>"}`) | | |
| ### Usage | |
| ```python | |
| import ast | |
| from datasets import load_dataset | |
| ds = load_dataset("servicenow-ai/gitlab-tasks") | |
| sample = ds["train"][0] | |
| config = ast.literal_eval(sample["task_config"]) | |
| # Load the validator | |
| exec(sample["validation"], globals()) | |
| score = validate( | |
| messages=[{"role": "assistant", "content": "Done."}], | |
| config=config, | |
| ) | |
| ``` | |
| ## Task categories | |
| ### Single-action tasks | |
| - **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. | |
| - **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. | |
| - **invite-user**: Invite a user to a project with a specific access level. Validated by checking project membership. | |
| - **update-issue** / **update-license** / **update-profile** / **update-status**: Modify an existing resource. Validated by reading back the resource state from the API. | |
| - **post-message**: Post a comment on a merge request. Validated by fetching the MR's notes. | |
| ### Information retrieval tasks | |
| - **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. | |
| - **open-issue**: Find and navigate to a specific issue. Validated by matching the URL against the API's issue reference. | |
| - **show-command**: Return the SSH clone command for a repository. Validated by comparing against the API's `ssh_url_to_repo`. | |
| ### Multi-step tasks | |
| - **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. | |
| - **get-and-update-info**: Update status and profile, then report repository contributions. Validated by checking status, profile URL, and message content. | |
| - **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. | |
| - **update-multiple-issues-single-repo**: Add comments to multiple issues. Validated by checking issue notes. | |