burtenshaw HF Staff commited on
Commit
03fffb5
·
verified ·
1 Parent(s): 4b76d4a

Add representative environment dataset

Browse files
README.md ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ pretty_name: Environment Dataset Example
3
+ tags:
4
+ - environment
5
+ - harbor
6
+ - verifiers
7
+ configs:
8
+ - config_name: tasks
9
+ data_files:
10
+ - split: train
11
+ path: data/train.jsonl
12
+ ---
13
+
14
+ # Environment Dataset Example
15
+
16
+ This repository is an ordinary Hub dataset with one Dataset Viewer config named
17
+ `tasks`. The `environment.yaml` file declares how environment clients should
18
+ interpret that config and its associated files.
19
+
20
+ Once this repository is pushed to the Hub, the existing **Use this dataset**
21
+ menu can generate standard loading snippets from the `tasks` config:
22
+
23
+ ```python
24
+ from datasets import load_dataset
25
+
26
+ tasks = load_dataset("burtenshaw/environment-dataset-example", "tasks", split="train")
27
+ ```
28
+
29
+ Environment clients can download the declaration without a custom Hub API:
30
+
31
+ ```python
32
+ from huggingface_hub import hf_hub_download
33
+
34
+ manifest_path = hf_hub_download(
35
+ repo_id="burtenshaw/environment-dataset-example",
36
+ repo_type="dataset",
37
+ filename="environment.yaml",
38
+ )
39
+ ```
40
+
41
+ The equivalent raw URL is:
42
+
43
+ ```text
44
+ https://huggingface.co/datasets/burtenshaw/environment-dataset-example/resolve/main/environment.yaml
45
+ ```
data/train.jsonl ADDED
@@ -0,0 +1 @@
 
 
1
+ {"task_id":"hello-environment","task_path":"tasks/hello-environment","prompt":[{"role":"user","content":"Create /tmp/hello.txt containing exactly: hello environment"}],"answer":"hello environment","info":{"category":"filesystem"}}
environment.yaml ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ spec_version: hf-env-0.1
2
+ environments:
3
+ - id: terminal-tasks
4
+ title: Terminal Tasks Example
5
+ config_name: tasks
6
+ splits: [train]
7
+ frameworks:
8
+ harbor:
9
+ min_version: ">=0.1.0"
10
+ verifiers:
11
+ min_version: ">=0.1.14"
12
+ adapter: verifiers.v1.packages.tasksets.HarborTaskset
13
+ dataset:
14
+ task_root: tasks
15
+ task_id_column: task_id
16
+ task_path_column: task_path
17
+ runtime:
18
+ isolation: container
19
+ network: disabled
20
+ reward:
21
+ type: scalar
tasks/hello-environment/instruction.md ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ Create `/tmp/hello.txt` containing exactly:
2
+
3
+ ```text
4
+ hello environment
5
+ ```
tasks/hello-environment/solution/solve.sh ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ #!/bin/sh
2
+ set -eu
3
+
4
+ mkdir -p /tmp
5
+ printf 'hello environment\n' > /tmp/hello.txt
tasks/hello-environment/task.toml ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ version = "1.0"
2
+
3
+ [metadata]
4
+ author_name = "Hugging Face"
5
+ author_email = "example@huggingface.co"
6
+ difficulty = "easy"
7
+ category = "filesystem"
8
+ tags = ["example", "environment"]
9
+
10
+ [verifier]
11
+ timeout_sec = 30.0
12
+
13
+ [agent]
14
+ timeout_sec = 30.0
tasks/hello-environment/tests/test.sh ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ #!/bin/sh
2
+ set -eu
3
+
4
+ test "$(cat /tmp/hello.txt)" = "hello environment"