File size: 6,343 Bytes
8acc7e7
95dc153
 
 
 
 
82ca243
95dc153
 
e0809c7
95dc153
 
8acc7e7
 
 
 
 
 
 
 
 
 
95dc153
82ca243
 
4baca0d
 
82ca243
 
 
 
 
 
c3510c5
 
 
 
 
 
2d042a7
b2bf356
c3510c5
 
 
95dc153
b2bf356
82ca243
 
 
 
 
 
 
95dc153
 
 
 
82ca243
 
 
 
 
 
 
 
95dc153
 
82ca243
95dc153
 
 
 
 
82ca243
95dc153
 
82ca243
95dc153
82ca243
95dc153
 
82ca243
95dc153
 
 
82ca243
95dc153
 
 
 
 
82ca243
ab64c92
 
 
95dc153
ab64c92
82ca243
ab64c92
 
 
 
 
95dc153
 
82ca243
 
b2bf356
ab64c92
82ca243
ab64c92
 
 
 
 
 
 
 
 
 
 
 
 
95dc153
82ca243
 
 
b2bf356
 
82ca243
 
 
 
 
 
 
 
 
 
 
 
 
b2bf356
82ca243
 
 
 
 
 
 
 
 
07ac4d8
 
 
 
 
 
 
 
 
 
 
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
---
license: mit
task_categories:
- question-answering
- table-question-answering
tags:
- smoldataenvs
- data-analysis
- agent
- rl-environment
- reinforcement-learning
- code-agent
configs:
- config_name: default
  data_files:
  - split: train
    path: data/train-*
  - split: test
    path: data/test-*
  - split: eval
    path: data/eval-*
---

<div align="center">

<img src="https://huggingface.co/datasets/FineEnvs/SmolDataEnvs/resolve/main/banner.png" alt="SmolDataEnvs" width="100%">

# 📈 SmolDataEnvs

[![Collection](https://img.shields.io/badge/%F0%9F%A4%97%20Collection-SmolDataEnvs-FFD21E?style=for-the-badge&labelColor=1a1a1a)](https://huggingface.co/collections/FineEnvs/smoldataenvs)

</div>

> **5.5K+ RL tasks for hill-climbing small models in code and data science.**

<div align="center">

<img src="https://huggingface.co/datasets/FineEnvs/SmolDataEnvs/resolve/main/curves.gif" alt="Reward and held-out pass@k climbing over 1,119 GRPO steps" width="100%">

<sub>A 2B model on these tasks. Left: what it optimises. Right: 144 held-out tasks it never trains on.<br>
Two runs over the same 5,000 tasks: <b>shuffled</b> against a <b>curriculum</b> ordered easiest to hardest.</sub>

</div>


Data-analysis tasks as a plain, load-and-go dataset: **no runtime, no framework required**. Each
row is one self-contained task: a real tabular dataset, a question about it, and a gold answer a
bundled grader can check deterministically. Load it, prompt any model however you like, grade the
result.

This is the front door. If you want the tasks as runnable sandboxed environments, use the
[Harbor suites](https://huggingface.co/datasets/FineEnvs/SmolDataEnvs-harbor-train); if you want
demonstrations to fine-tune on, use [`-sft`](https://huggingface.co/datasets/FineEnvs/SmolDataEnvs-sft).


## Splits

| Split | Tasks | Easy | Medium | Hard | What it's for |
|---|---|---|---|---|---|
| `train` | 5,000 | 1,433 | 2,845 | 722 | training |
| `test` | 250 | 33 | 118 | 99 | held-out benchmark, deliberately harder |
| `eval` | 144 | 16 | 74 | 54 | quick validation during a run |

The held-out splits are harder than train by construction: train is 29% easy and 14% hard, the
held-out splits are 11–13% easy and 38–40% hard. Worth knowing before you read any eval number.

## What's in a row

| Column | Meaning |
|---|---|
| `task_id`, `source_row_id` | identifiers |
| `question` | the question to answer |
| `answer` | the gold answer |
| `reward_mode`, `atol`, `rtol` | how to grade it: match type and numeric tolerances |
| `difficulty_level` (1–5), `difficulty_tier` | difficulty |
| `kaggle_dataset` | the source dataset |
| `hf_bucket`, `bucket_prefix`, `files` | where the input files live and what they are |
| `instruction` | the full agent prompt |
| `package_tier` | environment sizing hint |

## Load it

```python
from datasets import load_dataset

ds = load_dataset("FineEnvs/SmolDataEnvs", split="test")
row = ds[0]
print(row["question"], "→", row["answer"], f"({row['reward_mode']})")
```

## Grab the data files for a task

The tables live in a Hugging Face **bucket**, so they come down with the bucket API rather than
`snapshot_download`:

```python
from huggingface_hub import list_bucket_tree, download_bucket_files

prefix = row["bucket_prefix"].rstrip("/") + "/"
items = [i for i in list_bucket_tree(row["hf_bucket"], prefix=prefix, recursive=True)
         if getattr(i, "type", None) == "file"]
download_bucket_files(row["hf_bucket"],
                      files=[(i.path, "input/" + i.path.split("/")[-1]) for i in items])
```

## Grade a prediction

`grader.py` ships in this repo. It scores an answer through a ladder of checks: exact → numeric
with `atol`/`rtol` → list and percent normalisation → symbolic equivalence:

```python
from huggingface_hub import hf_hub_download
import importlib.util, sys

path = hf_hub_download("FineEnvs/SmolDataEnvs", "grader.py", repo_type="dataset")
spec = importlib.util.spec_from_file_location("grader", path)
grader = importlib.util.module_from_spec(spec)
sys.modules["grader"] = grader          # the dataclasses inside it need this
spec.loader.exec_module(grader)

r = grader.grade(row["answer"], my_prediction, reward_mode=row["reward_mode"],
                 abs_tol=row["atol"], rel_tol=row["rtol"])
print(r.reward, r.method)   # 1.0 exact | 0.0 miss
```

## Where it comes from

Built from the [jupyter-agent dataset](https://huggingface.co/datasets/jupyter-agent/jupyter-agent-dataset),
real data-science notebooks over 471 Kaggle datasets. Every question–answer pair was extracted and
then **verified**: strong agent models had to solve the task in a live sandbox and reproduce the gold
answer under deterministic grading. Anything ambiguous or un-checkable was dropped. So every task
here is known-solvable and unambiguously gradable.

**Verified by a checker, not judged by a model.** Grading is an exact comparison against a known
answer, through a ladder of checks: exact match → numeric with tolerances → list and percent
normalisation → symbolic equivalence. No LLM sits in the reward path, so the signal does not drift
when you change the grader's model, because there isn't one.

## The family

| Repo | What it is |
|---|---|
| [`SmolDataEnvs`](https://huggingface.co/datasets/FineEnvs/SmolDataEnvs) | the tasks as plain rows, load it and prompt any model |
| [`SmolDataEnvs-sft`](https://huggingface.co/datasets/FineEnvs/SmolDataEnvs-sft) | 4,677 verified agent trajectories, TRL-ready |
| [`SmolDataEnvs-harbor-train`](https://huggingface.co/datasets/FineEnvs/SmolDataEnvs-harbor-train) | 5,000 tasks as Harbor environments |
| [`SmolDataEnvs-harbor-test`](https://huggingface.co/datasets/FineEnvs/SmolDataEnvs-harbor-test) | 250 held-out, deliberately harder |
| [`SmolDataEnvs-harbor-eval`](https://huggingface.co/datasets/FineEnvs/SmolDataEnvs-harbor-eval) | 144 for quick validation during a run |

## Train on it

The simplest path, a notebook and a single-file script you can hand to HF Jobs, lives in
[FineEnvs/04-smoldataenvs](https://github.com/adithya-s-k/FineEnvs/tree/main/04-smoldataenvs).

## Citation

```bibtex
@misc{fineenvs,
  author = {Kolavi, Adithya S},
  title  = {FineEnvs: Open Source RL Environments for LLM Agents},
  year   = {2026},
  url    = {https://github.com/adithya-s-k/FineEnvs}
}
```