Deploy standalone SmolDataEnv Native OpenCode
Browse files- .dockerignore +10 -0
- .gitignore +9 -0
- Dockerfile +8 -11
- README.md +53 -2
- data/test.json +252 -0
- data/train.json +0 -0
- deploy.py +68 -0
- install.sh +18 -0
- openenv.yaml +6 -0
- prepare.py +138 -0
- pyproject.toml +11 -0
- requirements.txt +9 -0
- smoldataenv_opencode.egg-info/SOURCES.txt +13 -0
- smoldataenv_opencode.egg-info/dependency_links.txt +1 -0
- smoldataenv_opencode.egg-info/top_level.txt +1 -0
- smoldataenv_opencode/__init__.py +0 -0
- smoldataenv_opencode/catalog.py +39 -0
- smoldataenv_opencode/client.py +68 -0
- smoldataenv_opencode/daytona.py +144 -0
- smoldataenv_opencode/environment.py +98 -0
- smoldataenv_opencode/server.py +72 -0
- smoldataenv_opencode/tasks.py +75 -0
- start.sh +5 -0
.dockerignore
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
.deps/
|
| 2 |
+
.venv/
|
| 3 |
+
prepared/
|
| 4 |
+
__pycache__/
|
| 5 |
+
*.egg-info/
|
| 6 |
+
.pytest_cache/
|
| 7 |
+
.env
|
| 8 |
+
.gradio/
|
| 9 |
+
.archive/
|
| 10 |
+
.git/
|
.gitignore
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
.deps/
|
| 2 |
+
.venv/
|
| 3 |
+
prepared/
|
| 4 |
+
__pycache__/
|
| 5 |
+
*.egg-info/
|
| 6 |
+
.pytest_cache/
|
| 7 |
+
.env
|
| 8 |
+
.gradio/
|
| 9 |
+
.archive/
|
Dockerfile
CHANGED
|
@@ -1,12 +1,9 @@
|
|
| 1 |
-
FROM
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
RUN uv venv --python 3.12 /opt/environment && uv pip sync --python /opt/environment/bin/python --require-hashes /tmp/requirements-env.lock
|
| 7 |
-
COPY bundle.tar.gz /tmp/bundle.tar.gz
|
| 8 |
-
RUN python -c "import tarfile; tarfile.open('/tmp/bundle.tar.gz').extractall('/workspace/repro', filter='data')" && rm /tmp/bundle.tar.gz
|
| 9 |
-
RUN chown -R user:user /workspace /opt/environment
|
| 10 |
USER user
|
| 11 |
-
ENV
|
| 12 |
-
|
|
|
|
|
|
| 1 |
+
FROM python:3.12-slim
|
| 2 |
+
RUN apt-get update && apt-get install -y --no-install-recommends git curl && rm -rf /var/lib/apt/lists/*
|
| 3 |
+
WORKDIR /app
|
| 4 |
+
COPY . /app
|
| 5 |
+
RUN bash install.sh && useradd --create-home --uid 1000 user && chown -R user:user /app
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
USER user
|
| 7 |
+
ENV HOME=/home/user HF_HOME=/home/user/.cache/huggingface PYTHONUNBUFFERED=1 PORT=7860 ENABLE_WEB_INTERFACE=true
|
| 8 |
+
EXPOSE 7860
|
| 9 |
+
CMD ["bash", "start.sh"]
|
README.md
CHANGED
|
@@ -1,7 +1,58 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
|
|
|
|
|
|
|
|
|
| 3 |
sdk: docker
|
| 4 |
app_port: 7860
|
| 5 |
---
|
| 6 |
|
| 7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: SmolDataEnv Native OpenCode
|
| 3 |
+
emoji: 🧪
|
| 4 |
+
colorFrom: blue
|
| 5 |
+
colorTo: green
|
| 6 |
sdk: docker
|
| 7 |
app_port: 7860
|
| 8 |
---
|
| 9 |
|
| 10 |
+
# SmolDataEnv: Native OpenCode
|
| 11 |
+
|
| 12 |
+
Native OpenCode runs inside the sandbox. The server grades its answer and returns a typed token trace for AsyncGRPO.
|
| 13 |
+
|
| 14 |
+
This directory is the complete Space source. Copy it on its own, build it locally or upload it to a Docker Space. It has no imports from the other tutorial environments.
|
| 15 |
+
|
| 16 |
+
[Open the deployed UI](https://fineenvs-data-agent-blackbox-opencode-env.hf.space/web/) · [Space](https://huggingface.co/spaces/FineEnvs/data-agent-blackbox-opencode-env)
|
| 17 |
+
|
| 18 |
+
## Read the code
|
| 19 |
+
|
| 20 |
+
- [`smoldataenv_opencode/environment.py`](smoldataenv_opencode/environment.py): task execution and grading.
|
| 21 |
+
- [`smoldataenv_opencode/server.py`](smoldataenv_opencode/server.py): OpenEnv server and UI.
|
| 22 |
+
- [`prepare.py`](prepare.py) and [`data/`](data/): the pinned 1,000 train / 250 test tasks, with grader and split checks.
|
| 23 |
+
- [`Dockerfile`](Dockerfile): exactly what the Space builds.
|
| 24 |
+
|
| 25 |
+
## Run locally
|
| 26 |
+
|
| 27 |
+
Use Python 3.12. From this directory:
|
| 28 |
+
|
| 29 |
+
```bash
|
| 30 |
+
uv venv --python 3.12 --seed .venv
|
| 31 |
+
source .venv/bin/activate
|
| 32 |
+
bash install.sh
|
| 33 |
+
hf auth login
|
| 34 |
+
export HF_TOKEN="$(hf auth token)"
|
| 35 |
+
export DAYTONA_API_KEY="your-key"
|
| 36 |
+
bash start.sh
|
| 37 |
+
```
|
| 38 |
+
|
| 39 |
+
Open **http://localhost:7860/**. It opens the UI at `/web/`; the API is at `/docs` and health at `/health`. `install.sh` installs OpenEnv from main and its environment examples from the same checkout. This server needs no GPU or TRL installation.
|
| 40 |
+
|
| 41 |
+
For agent rollouts, set `SANDBOX_VLLM_URL` and the secret `SANDBOX_VLLM_KEY` to an inference endpoint reachable by the sandbox. Training requires engine token IDs and logprobs.
|
| 42 |
+
|
| 43 |
+
## Deploy this folder
|
| 44 |
+
|
| 45 |
+
```bash
|
| 46 |
+
python deploy.py --repo YOUR_ORG/data-agent-blackbox-opencode-env --public
|
| 47 |
+
```
|
| 48 |
+
|
| 49 |
+
Add `HF_TOKEN` and `DAYTONA_API_KEY` as Space secrets. The uploader sends the files in this directory, without generating or swapping application code. It enables the UI and preserves an existing concurrency limit. For a new Space the limit defaults to 40; use `--concurrency` to change it. CPU Basic serves the API; actual tasks run in Daytona.
|
| 50 |
+
|
| 51 |
+
You can test the same image locally:
|
| 52 |
+
|
| 53 |
+
```bash
|
| 54 |
+
docker build -t smoldataenv-opencode .
|
| 55 |
+
docker run --rm -p 7860:7860 -e HF_TOKEN -e DAYTONA_API_KEY smoldataenv-opencode
|
| 56 |
+
```
|
| 57 |
+
|
| 58 |
+
Runtime downloads, local credentials and old deployment archives are excluded from uploads and Docker builds. Task questions and held-out answers are never bundled into the image; the pinned tasks are prepared at startup.
|
data/test.json
ADDED
|
@@ -0,0 +1,252 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{"name": "0000_324_324293_qa_2", "source": "0000/324/324293.ipynb_qa_2", "notebook": "0000/324/324293.ipynb", "difficulty": "medium", "instruction_sha256": "03bd60bb664c4cc96b3ab85db3e3a18039dcfbfee06d3935696f002a2bb26bc5"},
|
| 3 |
+
{"name": "0000_340_340599_qa_1", "source": "0000/340/340599.ipynb_qa_1", "notebook": "0000/340/340599.ipynb", "difficulty": "medium", "instruction_sha256": "dd7911b3032aa469ef4f7cd9c71748c62cb560dcfc2bcc897e6111f4197f0383"},
|
| 4 |
+
{"name": "0000_340_340599_qa_3", "source": "0000/340/340599.ipynb_qa_3", "notebook": "0000/340/340599.ipynb", "difficulty": "easy", "instruction_sha256": "dac579f315382a7411af51143da96cfddafa1a68a0271d8e80e7da09a2e49d8c"},
|
| 5 |
+
{"name": "0000_347_347102_qa_1", "source": "0000/347/347102.ipynb_qa_1", "notebook": "0000/347/347102.ipynb", "difficulty": "medium", "instruction_sha256": "75ecfd8d28ed2da9ab44452168e9d8a84edcf7f24ca532ae0bc5f1c122cd5868"},
|
| 6 |
+
{"name": "0000_376_376301_qa_1", "source": "0000/376/376301.ipynb_qa_1", "notebook": "0000/376/376301.ipynb", "difficulty": "hard", "instruction_sha256": "9fbf3484b5169e2dcdcdc52b8022796ae1186c5a6f82d0116726a1311a86c556"},
|
| 7 |
+
{"name": "0000_407_407872_qa_4", "source": "0000/407/407872.ipynb_qa_4", "notebook": "0000/407/407872.ipynb", "difficulty": "medium", "instruction_sha256": "5e9308a8d05b4c1ee0e80a6d875574f2a7a63f18d1e299920bbc111aa78ad9a5"},
|
| 8 |
+
{"name": "0000_414_414083_qa_5", "source": "0000/414/414083.ipynb_qa_5", "notebook": "0000/414/414083.ipynb", "difficulty": "medium", "instruction_sha256": "db2224a25820236d26c5e3dbe269570ff6151c687bc6417a6cdc627c9bc2651c"},
|
| 9 |
+
{"name": "0000_416_416942_qa_3", "source": "0000/416/416942.ipynb_qa_3", "notebook": "0000/416/416942.ipynb", "difficulty": "medium", "instruction_sha256": "1f2d4a1984d64cfea338e269fb3cb6b4c46d0f4ae9dcaefaedec564fe62b42b9"},
|
| 10 |
+
{"name": "0000_419_419818_qa_1", "source": "0000/419/419818.ipynb_qa_1", "notebook": "0000/419/419818.ipynb", "difficulty": "hard", "instruction_sha256": "7021d93a934f65a61cd06d818b5effa346a9191cfb30235cb6553f26dea7666c"},
|
| 11 |
+
{"name": "0000_419_419825_qa_1", "source": "0000/419/419825.ipynb_qa_1", "notebook": "0000/419/419825.ipynb", "difficulty": "medium", "instruction_sha256": "f93eb525f14c051111544a4806e681302ca4f7311c50b8d061d2ebda76edeea2"},
|
| 12 |
+
{"name": "0000_419_419825_qa_2", "source": "0000/419/419825.ipynb_qa_2", "notebook": "0000/419/419825.ipynb", "difficulty": "medium", "instruction_sha256": "d5e8f840b0e2de1deb83b89f234cad36f3dd94945240609f8d43cdf1fb7e6918"},
|
| 13 |
+
{"name": "0000_421_421481_qa_2", "source": "0000/421/421481.ipynb_qa_2", "notebook": "0000/421/421481.ipynb", "difficulty": "medium", "instruction_sha256": "a1bb39b52801ea85dd8d1456d8b6fe30c3525f09f6b8c329cb6a25daccef7a21"},
|
| 14 |
+
{"name": "0000_421_421838_qa_1", "source": "0000/421/421838.ipynb_qa_1", "notebook": "0000/421/421838.ipynb", "difficulty": "medium", "instruction_sha256": "b289ee5a9751a43d8b63f7a5bdf733e056fda721f3df5ed7c7a0019045ef5b26"},
|
| 15 |
+
{"name": "0000_426_426505_qa_3", "source": "0000/426/426505.ipynb_qa_3", "notebook": "0000/426/426505.ipynb", "difficulty": "medium", "instruction_sha256": "709cd8d12afdb1145198a6deb65e6fd958390d8727a92835fc78f68a88de6fff"},
|
| 16 |
+
{"name": "0000_428_428622_qa_2", "source": "0000/428/428622.ipynb_qa_2", "notebook": "0000/428/428622.ipynb", "difficulty": "medium", "instruction_sha256": "d45a384ac73300ab8528dec90095dac3ee472f6ddf472050bd9b28f35dce957b"},
|
| 17 |
+
{"name": "0000_429_429367_qa_3", "source": "0000/429/429367.ipynb_qa_3", "notebook": "0000/429/429367.ipynb", "difficulty": "medium", "instruction_sha256": "9128a3704e211c2069495847044fed9e3c56c114190a6e595c1b385103f7710f"},
|
| 18 |
+
{"name": "0000_430_430116_qa_1", "source": "0000/430/430116.ipynb_qa_1", "notebook": "0000/430/430116.ipynb", "difficulty": "medium", "instruction_sha256": "f432746e61ae31e982fcbafc25fe0bb0491251447e2d259f3d63ed1d63abf494"},
|
| 19 |
+
{"name": "0000_430_430116_qa_3", "source": "0000/430/430116.ipynb_qa_3", "notebook": "0000/430/430116.ipynb", "difficulty": "medium", "instruction_sha256": "d1a13cd9d37fef259d1a19a6d7b3dace1eb194eb15250b8f9d133475695ba916"},
|
| 20 |
+
{"name": "0000_430_430387_qa_5", "source": "0000/430/430387.ipynb_qa_5", "notebook": "0000/430/430387.ipynb", "difficulty": "medium", "instruction_sha256": "fd3b7794d150b61e106e5bae16a4ee8491a45685aedd28de59752bd2523ca5f9"},
|
| 21 |
+
{"name": "0000_430_430797_qa_3", "source": "0000/430/430797.ipynb_qa_3", "notebook": "0000/430/430797.ipynb", "difficulty": "easy", "instruction_sha256": "70807740f335d615d2015b4e3fc9385a97dabd1f76a71bd60704a59372d705f4"},
|
| 22 |
+
{"name": "0000_430_430797_qa_4", "source": "0000/430/430797.ipynb_qa_4", "notebook": "0000/430/430797.ipynb", "difficulty": "easy", "instruction_sha256": "afa7f31692c87906f8546e92b9b38d1f687d3b21f5f735636d2f73e18ffd2596"},
|
| 23 |
+
{"name": "0000_431_431678_qa_5", "source": "0000/431/431678.ipynb_qa_5", "notebook": "0000/431/431678.ipynb", "difficulty": "easy", "instruction_sha256": "f70373d7853741d97ee7a0c080c86a14090d2fff6a1dfb5cbe1824649311e71b"},
|
| 24 |
+
{"name": "0000_432_432250_qa_4", "source": "0000/432/432250.ipynb_qa_4", "notebook": "0000/432/432250.ipynb", "difficulty": "medium", "instruction_sha256": "ac96191139e8122668d2112fa375a1ac91bca61263440d9a15200ed9c1238602"},
|
| 25 |
+
{"name": "0000_435_435800_qa_4", "source": "0000/435/435800.ipynb_qa_4", "notebook": "0000/435/435800.ipynb", "difficulty": "medium", "instruction_sha256": "7d094b3cad8c48e1b22fc98b6fc49d8e5e73c476b04ab1a811d00105126446e2"},
|
| 26 |
+
{"name": "0000_440_440038_qa_4", "source": "0000/440/440038.ipynb_qa_4", "notebook": "0000/440/440038.ipynb", "difficulty": "medium", "instruction_sha256": "f49c9f362f95d66700eb9e036fe413f525985abbe46df8032de743265b61f9f7"},
|
| 27 |
+
{"name": "0000_440_440038_qa_5", "source": "0000/440/440038.ipynb_qa_5", "notebook": "0000/440/440038.ipynb", "difficulty": "easy", "instruction_sha256": "a500e2ff0801452ecf7230def6e5ab9db96faa80a6b7775a49c3cab694c53600"},
|
| 28 |
+
{"name": "0000_441_441126_qa_2", "source": "0000/441/441126.ipynb_qa_2", "notebook": "0000/441/441126.ipynb", "difficulty": "easy", "instruction_sha256": "b83ab32da1d187f5fc4b1f3a3de5828e5d014ae675904397b6945733a3a5c600"},
|
| 29 |
+
{"name": "0000_441_441126_qa_5", "source": "0000/441/441126.ipynb_qa_5", "notebook": "0000/441/441126.ipynb", "difficulty": "medium", "instruction_sha256": "d83c61fcd757aa118b085c267ba3dcd45f23784fa9e997a161eda6ffe62d03d6"},
|
| 30 |
+
{"name": "0000_445_445307_qa_2", "source": "0000/445/445307.ipynb_qa_2", "notebook": "0000/445/445307.ipynb", "difficulty": "medium", "instruction_sha256": "37b5b8bcc12079ead32027f392959b7fa43739f6b545b21608f3ec99182d751d"},
|
| 31 |
+
{"name": "0000_445_445912_qa_3", "source": "0000/445/445912.ipynb_qa_3", "notebook": "0000/445/445912.ipynb", "difficulty": "medium", "instruction_sha256": "65e658c39d354dc010c1d0a177edefb1f964acbea18791adaeb69e0c6d3273f9"},
|
| 32 |
+
{"name": "0000_455_455459_qa_5", "source": "0000/455/455459.ipynb_qa_5", "notebook": "0000/455/455459.ipynb", "difficulty": "hard", "instruction_sha256": "3fabd97dc24653b0d9261de8ceb05829a5c593c9183d82422b44de9398c7b77d"},
|
| 33 |
+
{"name": "0000_455_455476_qa_5", "source": "0000/455/455476.ipynb_qa_5", "notebook": "0000/455/455476.ipynb", "difficulty": "hard", "instruction_sha256": "1351770e709a28a0b76d417d0e407adda497e4957268f11ca9a361346c2756f1"},
|
| 34 |
+
{"name": "0000_457_457079_qa_2", "source": "0000/457/457079.ipynb_qa_2", "notebook": "0000/457/457079.ipynb", "difficulty": "easy", "instruction_sha256": "249caa6706e1e9e7e879b48478b7ddb274fae57fe12b90e4d433560bf4316588"},
|
| 35 |
+
{"name": "0000_458_458419_qa_1", "source": "0000/458/458419.ipynb_qa_1", "notebook": "0000/458/458419.ipynb", "difficulty": "easy", "instruction_sha256": "e4e99f0db8569d98903fc4c0740e1d8df000bc3c8fa0f923107a653c3821187e"},
|
| 36 |
+
{"name": "0000_458_458419_qa_3", "source": "0000/458/458419.ipynb_qa_3", "notebook": "0000/458/458419.ipynb", "difficulty": "easy", "instruction_sha256": "4aab5d85a1a669b3f3c0bfd4ca2cc097938cdc73bd6ac787b9c12869343656a5"},
|
| 37 |
+
{"name": "0000_458_458607_qa_2", "source": "0000/458/458607.ipynb_qa_2", "notebook": "0000/458/458607.ipynb", "difficulty": "medium", "instruction_sha256": "0146592334708eeacc34f66ea61b139029bab3dc6ee394fd949a84e0aa18edbd"},
|
| 38 |
+
{"name": "0000_458_458607_qa_3", "source": "0000/458/458607.ipynb_qa_3", "notebook": "0000/458/458607.ipynb", "difficulty": "medium", "instruction_sha256": "37b2b7c62f22411583d0557e362733d2d79c1d3f1ed241099638569055cd478b"},
|
| 39 |
+
{"name": "0000_458_458607_qa_4", "source": "0000/458/458607.ipynb_qa_4", "notebook": "0000/458/458607.ipynb", "difficulty": "medium", "instruction_sha256": "3d4d72429aeb58095357510d9c20586237c89f4a5abe870662db4bce5d2a8755"},
|
| 40 |
+
{"name": "0000_458_458607_qa_5", "source": "0000/458/458607.ipynb_qa_5", "notebook": "0000/458/458607.ipynb", "difficulty": "medium", "instruction_sha256": "ce591a3f66473fb68068d47d7ac36c3e1796812d4ce2593fe47dabc5e9882c3f"},
|
| 41 |
+
{"name": "0000_461_461615_qa_4", "source": "0000/461/461615.ipynb_qa_4", "notebook": "0000/461/461615.ipynb", "difficulty": "medium", "instruction_sha256": "5e5f5c76ef29edb47b170a647a97a635d86c45d5d5a172f963c21824b9a9d6b8"},
|
| 42 |
+
{"name": "0000_462_462872_qa_2", "source": "0000/462/462872.ipynb_qa_2", "notebook": "0000/462/462872.ipynb", "difficulty": "medium", "instruction_sha256": "d7928f6dc559541b8e3967f8c8032f732bc40138f28780504b3d72ed6f9888a8"},
|
| 43 |
+
{"name": "0000_470_470407_qa_4", "source": "0000/470/470407.ipynb_qa_4", "notebook": "0000/470/470407.ipynb", "difficulty": "easy", "instruction_sha256": "0f558d39988dbe2904f8d05a927501290d59a139e9d22ecdae93c13171e322d7"},
|
| 44 |
+
{"name": "0000_471_471618_qa_2", "source": "0000/471/471618.ipynb_qa_2", "notebook": "0000/471/471618.ipynb", "difficulty": "easy", "instruction_sha256": "efdfd2d18da4a302166f9c6ee54670705993111db3e916565023e259ac41cc3f"},
|
| 45 |
+
{"name": "0000_471_471618_qa_5", "source": "0000/471/471618.ipynb_qa_5", "notebook": "0000/471/471618.ipynb", "difficulty": "medium", "instruction_sha256": "cae783d2b4f4ee815ab56726b3b88e55db0601c21d7dab76a0f7cc603db950a4"},
|
| 46 |
+
{"name": "0000_473_473331_qa_1", "source": "0000/473/473331.ipynb_qa_1", "notebook": "0000/473/473331.ipynb", "difficulty": "easy", "instruction_sha256": "4bf9b29b157bdc702d190ab0f83793afbb19c18e1021ba836a7400d6981bcab9"},
|
| 47 |
+
{"name": "0000_500_500452_qa_3", "source": "0000/500/500452.ipynb_qa_3", "notebook": "0000/500/500452.ipynb", "difficulty": "medium", "instruction_sha256": "b9bf81fea1fc5dbc6c98a7d000f7f5fe5c9b5d0b41fcdf4776eb60ed1d4df753"},
|
| 48 |
+
{"name": "0000_513_513191_qa_3", "source": "0000/513/513191.ipynb_qa_3", "notebook": "0000/513/513191.ipynb", "difficulty": "medium", "instruction_sha256": "d830524a3aa9c50209cb92c37b21fde973cfb9357817a7dd157a91e34925d675"},
|
| 49 |
+
{"name": "0000_526_526379_qa_1", "source": "0000/526/526379.ipynb_qa_1", "notebook": "0000/526/526379.ipynb", "difficulty": "medium", "instruction_sha256": "58e54442a78cf2c4600e35cad0298abec06d359ae11c5417ea02a4db1f4b7204"},
|
| 50 |
+
{"name": "0000_528_528067_qa_5", "source": "0000/528/528067.ipynb_qa_5", "notebook": "0000/528/528067.ipynb", "difficulty": "medium", "instruction_sha256": "dfde5bf6704b342502587bda9fbe65d5f20b3665d4359a12c6947ac62991cde3"},
|
| 51 |
+
{"name": "0000_531_531577_qa_1", "source": "0000/531/531577.ipynb_qa_1", "notebook": "0000/531/531577.ipynb", "difficulty": "easy", "instruction_sha256": "6459848e9a6bce5061a333107e5ba97c8b954567e1305237b7f744737f4f4e17"},
|
| 52 |
+
{"name": "0000_531_531577_qa_2", "source": "0000/531/531577.ipynb_qa_2", "notebook": "0000/531/531577.ipynb", "difficulty": "medium", "instruction_sha256": "ace88bde6c834d6a92948204e7d6ca9e9573210369174d1a251f4d1aded9ba95"},
|
| 53 |
+
{"name": "0000_537_537525_qa_4", "source": "0000/537/537525.ipynb_qa_4", "notebook": "0000/537/537525.ipynb", "difficulty": "medium", "instruction_sha256": "742b20af32c570a0c8f84c73652d1939377d88f50de27dd867fed275a6589d95"},
|
| 54 |
+
{"name": "0000_541_541073_qa_1", "source": "0000/541/541073.ipynb_qa_1", "notebook": "0000/541/541073.ipynb", "difficulty": "easy", "instruction_sha256": "71d60f5f4ef8349c3d0acca7cb98ac08f9b3451e4238accacc98e778c39ccd31"},
|
| 55 |
+
{"name": "0000_545_545324_qa_1", "source": "0000/545/545324.ipynb_qa_1", "notebook": "0000/545/545324.ipynb", "difficulty": "medium", "instruction_sha256": "abe5e6253bcc116547dcfd59412e78fa2611943790485e0b5e4d5305c2cae360"},
|
| 56 |
+
{"name": "0000_549_549519_qa_1", "source": "0000/549/549519.ipynb_qa_1", "notebook": "0000/549/549519.ipynb", "difficulty": "hard", "instruction_sha256": "89a11870b7bba0b86d0d813c99147889da41c05b61bf081165cdc45744175460"},
|
| 57 |
+
{"name": "0000_551_551429_qa_1", "source": "0000/551/551429.ipynb_qa_1", "notebook": "0000/551/551429.ipynb", "difficulty": "easy", "instruction_sha256": "a2efaaa0bcaff4125bf9b836449d5fe6f4332e52843048675e7f19db9174f404"},
|
| 58 |
+
{"name": "0000_561_561293_qa_4", "source": "0000/561/561293.ipynb_qa_4", "notebook": "0000/561/561293.ipynb", "difficulty": "medium", "instruction_sha256": "efebaef984a86ae3ae705ff7757e26a5b78626d06f3ffbdde0fde0c1d7394eb8"},
|
| 59 |
+
{"name": "0000_566_566544_qa_3", "source": "0000/566/566544.ipynb_qa_3", "notebook": "0000/566/566544.ipynb", "difficulty": "hard", "instruction_sha256": "6bd12a2b5c344e8fb22f8034a803acc0da8921a94e02b317db9651d7377fd33a"},
|
| 60 |
+
{"name": "0000_577_577064_qa_3", "source": "0000/577/577064.ipynb_qa_3", "notebook": "0000/577/577064.ipynb", "difficulty": "hard", "instruction_sha256": "b06ff2b2b5a1df6280812c080f9327b720c8b2c46dcc3392d917257dd7e23659"},
|
| 61 |
+
{"name": "0000_577_577064_qa_5", "source": "0000/577/577064.ipynb_qa_5", "notebook": "0000/577/577064.ipynb", "difficulty": "hard", "instruction_sha256": "24e9b8a97daa06efb4cd4e94d8a55b0682ed80eef42bfb28502922d6e83f5102"},
|
| 62 |
+
{"name": "0000_582_582934_qa_3", "source": "0000/582/582934.ipynb_qa_3", "notebook": "0000/582/582934.ipynb", "difficulty": "medium", "instruction_sha256": "ab8fb0eafd3beff9817b968a2f570fb623e3447713df3cd93122e93de7acb9ff"},
|
| 63 |
+
{"name": "0000_593_593356_qa_1", "source": "0000/593/593356.ipynb_qa_1", "notebook": "0000/593/593356.ipynb", "difficulty": "easy", "instruction_sha256": "837b40e81db2c27e18b939bfbac4c56f4b26a637fca4cd4f98bbd27a514b756c"},
|
| 64 |
+
{"name": "0000_593_593356_qa_4", "source": "0000/593/593356.ipynb_qa_4", "notebook": "0000/593/593356.ipynb", "difficulty": "easy", "instruction_sha256": "522dec56afb0fb74dfcee671aaa1ac5cee0bccc4fc90ec67ac5b9c909185c6f5"},
|
| 65 |
+
{"name": "0000_603_603758_qa_1", "source": "0000/603/603758.ipynb_qa_1", "notebook": "0000/603/603758.ipynb", "difficulty": "medium", "instruction_sha256": "319f092ed597b1432c409918b65b6b8dce99b93f885d0c63b9f70ec67ef8e009"},
|
| 66 |
+
{"name": "0000_621_621324_qa_4", "source": "0000/621/621324.ipynb_qa_4", "notebook": "0000/621/621324.ipynb", "difficulty": "medium", "instruction_sha256": "e06b0002cb35bb3215fb2d7e322186654c8a54b6fbeba726d1496089b5bbf259"},
|
| 67 |
+
{"name": "0000_641_641256_qa_3", "source": "0000/641/641256.ipynb_qa_3", "notebook": "0000/641/641256.ipynb", "difficulty": "medium", "instruction_sha256": "df1c0b9d077fa19786f972b08fc92c0a3aae908ee10f38f2990e9fbaed7d1e78"},
|
| 68 |
+
{"name": "0000_647_647453_qa_3", "source": "0000/647/647453.ipynb_qa_3", "notebook": "0000/647/647453.ipynb", "difficulty": "medium", "instruction_sha256": "65050bea6f1b595a92d5c0d1a9523e9d3803f5fe3756384aa38b0bd8da998402"},
|
| 69 |
+
{"name": "0000_649_649690_qa_4", "source": "0000/649/649690.ipynb_qa_4", "notebook": "0000/649/649690.ipynb", "difficulty": "easy", "instruction_sha256": "e1b1f2fe41bdabcf329b20e7a394a945b995360f9082bf7d0e19d01314457e0d"},
|
| 70 |
+
{"name": "0000_651_651325_qa_3", "source": "0000/651/651325.ipynb_qa_3", "notebook": "0000/651/651325.ipynb", "difficulty": "medium", "instruction_sha256": "4680edb05fa3f91dadfe50522c56fa1a29b4c5b9f92907b480ee909acf1d93b4"},
|
| 71 |
+
{"name": "0000_651_651325_qa_4", "source": "0000/651/651325.ipynb_qa_4", "notebook": "0000/651/651325.ipynb", "difficulty": "easy", "instruction_sha256": "9e7db4e2f4660256317f9aa610c417a21b6aa90b19f92501cd0dbc750da599c5"},
|
| 72 |
+
{"name": "0000_656_656399_qa_4", "source": "0000/656/656399.ipynb_qa_4", "notebook": "0000/656/656399.ipynb", "difficulty": "hard", "instruction_sha256": "7c45aced8fe16adba54b514a5f3d25001ff53d5c2123d0015f67a73981e67853"},
|
| 73 |
+
{"name": "0000_658_658395_qa_1", "source": "0000/658/658395.ipynb_qa_1", "notebook": "0000/658/658395.ipynb", "difficulty": "medium", "instruction_sha256": "ae339d42c3b652cf4bef4138a0bd1de3bfd7838b087d879ebea99ac32048331d"},
|
| 74 |
+
{"name": "0000_658_658395_qa_3", "source": "0000/658/658395.ipynb_qa_3", "notebook": "0000/658/658395.ipynb", "difficulty": "medium", "instruction_sha256": "5cbc681e1ba1c21a15d66d5b67781a5e7825a106008973fe4cf326804338aaff"},
|
| 75 |
+
{"name": "0000_660_660223_qa_1", "source": "0000/660/660223.ipynb_qa_1", "notebook": "0000/660/660223.ipynb", "difficulty": "easy", "instruction_sha256": "daf19149ff52aacdcb8166eaae1c15d26db61c28a6a8f534c86d32d352abc3db"},
|
| 76 |
+
{"name": "0000_663_663164_qa_1", "source": "0000/663/663164.ipynb_qa_1", "notebook": "0000/663/663164.ipynb", "difficulty": "medium", "instruction_sha256": "67be63bb477517ca71cda922ecbd717565ee3073f9159d44107f4b20b113d245"},
|
| 77 |
+
{"name": "0000_667_667350_qa_3", "source": "0000/667/667350.ipynb_qa_3", "notebook": "0000/667/667350.ipynb", "difficulty": "medium", "instruction_sha256": "64a938c15df7869a21ab28844f489498f87684ce8409fd9c139dc355a24e77c6"},
|
| 78 |
+
{"name": "0000_667_667579_qa_1", "source": "0000/667/667579.ipynb_qa_1", "notebook": "0000/667/667579.ipynb", "difficulty": "medium", "instruction_sha256": "59d7cd5d15a780f8cf9f55d2841c8e42204abb6c4602c52be642e3fd7706b521"},
|
| 79 |
+
{"name": "0000_667_667579_qa_3", "source": "0000/667/667579.ipynb_qa_3", "notebook": "0000/667/667579.ipynb", "difficulty": "easy", "instruction_sha256": "999914485081a8c8742d4709dd2f1c8becbcb2ca0e15d1c50d652a239da8e2c3"},
|
| 80 |
+
{"name": "0000_672_672627_qa_1", "source": "0000/672/672627.ipynb_qa_1", "notebook": "0000/672/672627.ipynb", "difficulty": "medium", "instruction_sha256": "a118ca39a13553379f59c2f52ac8e5f57451188d78fcc4ff3eb7c7d7100325d7"},
|
| 81 |
+
{"name": "0000_672_672627_qa_2", "source": "0000/672/672627.ipynb_qa_2", "notebook": "0000/672/672627.ipynb", "difficulty": "medium", "instruction_sha256": "1aa6da56fd3c1df99c271c1589949b2b5bbf9e4225c22319d06428d449b301e7"},
|
| 82 |
+
{"name": "0000_672_672627_qa_4", "source": "0000/672/672627.ipynb_qa_4", "notebook": "0000/672/672627.ipynb", "difficulty": "hard", "instruction_sha256": "c208af7dc59b41a590023a8f434f2c9cd5abadf4e4ca838f1dfcb430d06299b1"},
|
| 83 |
+
{"name": "0000_680_680306_qa_1", "source": "0000/680/680306.ipynb_qa_1", "notebook": "0000/680/680306.ipynb", "difficulty": "easy", "instruction_sha256": "992b85fe340bbb85c44200a28b66a4d34d6ce73b018e2ca1f7bbad911a779690"},
|
| 84 |
+
{"name": "0000_682_682562_qa_1", "source": "0000/682/682562.ipynb_qa_1", "notebook": "0000/682/682562.ipynb", "difficulty": "medium", "instruction_sha256": "8ca32e6cb9dafec55faefe0ef9b94f6c24b038bfeb6bf8a05fcaf4161125c17f"},
|
| 85 |
+
{"name": "0000_682_682562_qa_2", "source": "0000/682/682562.ipynb_qa_2", "notebook": "0000/682/682562.ipynb", "difficulty": "medium", "instruction_sha256": "9117cd8c4654316aa03ddc453247a3a43d8878cabf21999961a169c72e77ed06"},
|
| 86 |
+
{"name": "0000_684_684849_qa_1", "source": "0000/684/684849.ipynb_qa_1", "notebook": "0000/684/684849.ipynb", "difficulty": "easy", "instruction_sha256": "a6568d2d48d6c8613d846247b43b12302053db7312d67496cbb6414a17c95769"},
|
| 87 |
+
{"name": "0000_684_684849_qa_2", "source": "0000/684/684849.ipynb_qa_2", "notebook": "0000/684/684849.ipynb", "difficulty": "easy", "instruction_sha256": "4d2cd7576e5941a4129630685267c7aa0c410d55a0b6c23f07816fe1554ac0df"},
|
| 88 |
+
{"name": "0000_684_684849_qa_3", "source": "0000/684/684849.ipynb_qa_3", "notebook": "0000/684/684849.ipynb", "difficulty": "medium", "instruction_sha256": "232a31c7db1871385e04f4a26243a6effd9c47305ba4ce0a15993bff939ccfda"},
|
| 89 |
+
{"name": "0000_684_684849_qa_4", "source": "0000/684/684849.ipynb_qa_4", "notebook": "0000/684/684849.ipynb", "difficulty": "easy", "instruction_sha256": "aa9b52a1677e5b04e548f5d90c5a01193f11af078bc3d13a9db793471771522f"},
|
| 90 |
+
{"name": "0000_689_689967_qa_5", "source": "0000/689/689967.ipynb_qa_5", "notebook": "0000/689/689967.ipynb", "difficulty": "medium", "instruction_sha256": "6f36e1970f9283442ccd37f89764501c40860ea4efe04e16348008fc1fe8cf9e"},
|
| 91 |
+
{"name": "0000_696_696467_qa_5", "source": "0000/696/696467.ipynb_qa_5", "notebook": "0000/696/696467.ipynb", "difficulty": "hard", "instruction_sha256": "81599d9fc2ed82843e1a0d746d2a784f5681ee6029076d322e3c833b0fa4e398"},
|
| 92 |
+
{"name": "0000_710_710837_qa_4", "source": "0000/710/710837.ipynb_qa_4", "notebook": "0000/710/710837.ipynb", "difficulty": "easy", "instruction_sha256": "9429c146379c49f0c2371404dd1d41f4150004d9652a73f3d632b9f2d4a4bda1"},
|
| 93 |
+
{"name": "0000_717_717375_qa_1", "source": "0000/717/717375.ipynb_qa_1", "notebook": "0000/717/717375.ipynb", "difficulty": "medium", "instruction_sha256": "06506d29207e5c4312258735c95818212b40b4e5928cb96596e9488fd3b465ca"},
|
| 94 |
+
{"name": "0000_730_730302_qa_3", "source": "0000/730/730302.ipynb_qa_3", "notebook": "0000/730/730302.ipynb", "difficulty": "medium", "instruction_sha256": "503979c88723ef843f326f0c3e365496c620b3472ea2efdf222a28f19855ac76"},
|
| 95 |
+
{"name": "0000_731_731312_qa_3", "source": "0000/731/731312.ipynb_qa_3", "notebook": "0000/731/731312.ipynb", "difficulty": "medium", "instruction_sha256": "c76ec2b00cc490c7530815c1f06f4a5d44ddd6b619fd62a6e170af54c3da36a0"},
|
| 96 |
+
{"name": "0000_731_731973_qa_4", "source": "0000/731/731973.ipynb_qa_4", "notebook": "0000/731/731973.ipynb", "difficulty": "medium", "instruction_sha256": "7416dc6ec3b5dd4d20f77f85c10de337f835f444368a7936e6dbb1dd53d0c3e4"},
|
| 97 |
+
{"name": "0000_731_731973_qa_5", "source": "0000/731/731973.ipynb_qa_5", "notebook": "0000/731/731973.ipynb", "difficulty": "medium", "instruction_sha256": "3372b3a8e455a924afc9d1f3fce0c4cbde7993455ee1abbd8946be8c3393f83e"},
|
| 98 |
+
{"name": "0000_740_740974_qa_1", "source": "0000/740/740974.ipynb_qa_1", "notebook": "0000/740/740974.ipynb", "difficulty": "medium", "instruction_sha256": "51076b6f80b88235589e60d2e5689f40fc56d53214a692e13c16623d06595411"},
|
| 99 |
+
{"name": "0000_746_746224_qa_4", "source": "0000/746/746224.ipynb_qa_4", "notebook": "0000/746/746224.ipynb", "difficulty": "easy", "instruction_sha256": "bc0ce441ef8c2529a24d09ef9e2ead9d520fac6241c2e9660ff0b050d85cfaf4"},
|
| 100 |
+
{"name": "0000_748_748225_qa_1", "source": "0000/748/748225.ipynb_qa_1", "notebook": "0000/748/748225.ipynb", "difficulty": "hard", "instruction_sha256": "d5d9ddd66f2d34b2d792f811f0eb090e3103c13649d9caa557bd0c6b08b7a6f9"},
|
| 101 |
+
{"name": "0000_748_748225_qa_2", "source": "0000/748/748225.ipynb_qa_2", "notebook": "0000/748/748225.ipynb", "difficulty": "easy", "instruction_sha256": "058e577f4f88ddb5a012f1cf70356c3e5b35028de6565df29921fdbebce1c2e6"},
|
| 102 |
+
{"name": "0000_757_757598_qa_2", "source": "0000/757/757598.ipynb_qa_2", "notebook": "0000/757/757598.ipynb", "difficulty": "hard", "instruction_sha256": "7fc59ba6822b520cf5f4548b7f7a3cbfc1c920f2db7021afdac7ae24c4b8f802"},
|
| 103 |
+
{"name": "0000_761_761305_qa_2", "source": "0000/761/761305.ipynb_qa_2", "notebook": "0000/761/761305.ipynb", "difficulty": "hard", "instruction_sha256": "9bbfa570560a5df0ddce5aadbed32bdbd2eb495ae23a99fd86b4b479b0dfc329"},
|
| 104 |
+
{"name": "0000_764_764519_qa_3", "source": "0000/764/764519.ipynb_qa_3", "notebook": "0000/764/764519.ipynb", "difficulty": "medium", "instruction_sha256": "f78e0e7e974d8b537cf39fe956ea9d4a4e7a9f61a8b6b17b4aad7fb1183a3eb1"},
|
| 105 |
+
{"name": "0000_774_774985_qa_2", "source": "0000/774/774985.ipynb_qa_2", "notebook": "0000/774/774985.ipynb", "difficulty": "medium", "instruction_sha256": "383b5f3438bda3280a234ba459d6bc2f4ca31f2ee130b06e98581490407dd718"},
|
| 106 |
+
{"name": "0000_774_774985_qa_3", "source": "0000/774/774985.ipynb_qa_3", "notebook": "0000/774/774985.ipynb", "difficulty": "easy", "instruction_sha256": "949b9d763834af414d2fd8f764de90bf7f05546e3529ed692cb1a42380ffcd2a"},
|
| 107 |
+
{"name": "0000_780_780974_qa_2", "source": "0000/780/780974.ipynb_qa_2", "notebook": "0000/780/780974.ipynb", "difficulty": "medium", "instruction_sha256": "9b0097f35a24e14c9b234459c810528139656fc50db9693ebf242e5ea8873ee7"},
|
| 108 |
+
{"name": "0000_785_785253_qa_1", "source": "0000/785/785253.ipynb_qa_1", "notebook": "0000/785/785253.ipynb", "difficulty": "hard", "instruction_sha256": "a0cdabdf41fdd56f6f32c91271be895b6823e91e9559358222b1e0fae445b474"},
|
| 109 |
+
{"name": "0000_787_787044_qa_1", "source": "0000/787/787044.ipynb_qa_1", "notebook": "0000/787/787044.ipynb", "difficulty": "medium", "instruction_sha256": "56e9269d71068da68325d160c21c1db23946c0ad91d095d4fd88f1c8e3a2dfd3"},
|
| 110 |
+
{"name": "0000_791_791422_qa_3", "source": "0000/791/791422.ipynb_qa_3", "notebook": "0000/791/791422.ipynb", "difficulty": "medium", "instruction_sha256": "01cc9e42d9ac2304377fac1f60892168e6f97e47e7f527d4b684de505d74f3b1"},
|
| 111 |
+
{"name": "0000_806_806826_qa_5", "source": "0000/806/806826.ipynb_qa_5", "notebook": "0000/806/806826.ipynb", "difficulty": "medium", "instruction_sha256": "3de49764252480764f3f0d90b927bdf77bc213b14ab2515cf7c7ca86e166db97"},
|
| 112 |
+
{"name": "0000_807_807075_qa_1", "source": "0000/807/807075.ipynb_qa_1", "notebook": "0000/807/807075.ipynb", "difficulty": "medium", "instruction_sha256": "64e9944e641909a06e53be02255df6a121f6367346f91b386d2e49042c842e07"},
|
| 113 |
+
{"name": "0000_812_812048_qa_1", "source": "0000/812/812048.ipynb_qa_1", "notebook": "0000/812/812048.ipynb", "difficulty": "medium", "instruction_sha256": "bd581e171c6c52642986e824fa2ea148fab451b5b70d11b4ab0ea41ccba03e9f"},
|
| 114 |
+
{"name": "0000_812_812048_qa_2", "source": "0000/812/812048.ipynb_qa_2", "notebook": "0000/812/812048.ipynb", "difficulty": "medium", "instruction_sha256": "4118a257dae241287e88c2519550cc91e5e5cc9ea8d04dd9a50f26d4d3760d1b"},
|
| 115 |
+
{"name": "0000_813_813578_qa_5", "source": "0000/813/813578.ipynb_qa_5", "notebook": "0000/813/813578.ipynb", "difficulty": "medium", "instruction_sha256": "5e5b029471fa5d3382713fce73975e53419e6b516db800d56c495c6a5336dfa1"},
|
| 116 |
+
{"name": "0000_816_816225_qa_3", "source": "0000/816/816225.ipynb_qa_3", "notebook": "0000/816/816225.ipynb", "difficulty": "medium", "instruction_sha256": "5238d69faf6d78129e9c754683ea8f5be3a95d0dca5d3092d773b27e0f3facb2"},
|
| 117 |
+
{"name": "0000_822_822279_qa_1", "source": "0000/822/822279.ipynb_qa_1", "notebook": "0000/822/822279.ipynb", "difficulty": "medium", "instruction_sha256": "c641d9bcbd08566c8f3e76bd51be904d268790ec0f612c6ed766bd7e84dd3761"},
|
| 118 |
+
{"name": "0000_822_822279_qa_2", "source": "0000/822/822279.ipynb_qa_2", "notebook": "0000/822/822279.ipynb", "difficulty": "medium", "instruction_sha256": "dff13714238cf63f28ba853c76e0d9973309a5e35755651eb57e38353978f67d"},
|
| 119 |
+
{"name": "0000_822_822279_qa_4", "source": "0000/822/822279.ipynb_qa_4", "notebook": "0000/822/822279.ipynb", "difficulty": "easy", "instruction_sha256": "1d6077fabd21bf78ec5d947d119b3b4a84080bb3e448651ff66158fa886f7d5c"},
|
| 120 |
+
{"name": "0000_822_822279_qa_5", "source": "0000/822/822279.ipynb_qa_5", "notebook": "0000/822/822279.ipynb", "difficulty": "easy", "instruction_sha256": "5fe0b11c6fcafdc22863c2d49c6b2dc76416863fa44f23648802c566a92e5bf8"},
|
| 121 |
+
{"name": "0000_837_837727_qa_4", "source": "0000/837/837727.ipynb_qa_4", "notebook": "0000/837/837727.ipynb", "difficulty": "medium", "instruction_sha256": "19511e8fed5300ae1dd69e7c905666f59aa2e549c2221e911a1489f599de01c7"},
|
| 122 |
+
{"name": "0000_838_838183_qa_2", "source": "0000/838/838183.ipynb_qa_2", "notebook": "0000/838/838183.ipynb", "difficulty": "easy", "instruction_sha256": "881b0c1d40d29e5c09520eebe281d092a4a11d8f8caecbbeb2a00582267f0b68"},
|
| 123 |
+
{"name": "0000_840_840617_qa_3", "source": "0000/840/840617.ipynb_qa_3", "notebook": "0000/840/840617.ipynb", "difficulty": "easy", "instruction_sha256": "b15b0bfe48ac8dd2e6b1c579273bbf19ea6c44036ea9ba74fbbf71397194d454"},
|
| 124 |
+
{"name": "0000_847_847719_qa_3", "source": "0000/847/847719.ipynb_qa_3", "notebook": "0000/847/847719.ipynb", "difficulty": "medium", "instruction_sha256": "991fb62da199af9a7f02d375ae55293441d0e2fe046cb8300913e083ec663563"},
|
| 125 |
+
{"name": "0000_847_847719_qa_5", "source": "0000/847/847719.ipynb_qa_5", "notebook": "0000/847/847719.ipynb", "difficulty": "medium", "instruction_sha256": "4a32e4206835aada938093a99b2d2bd1498cfe797a6498cb932d5ad37059464c"},
|
| 126 |
+
{"name": "0000_856_856349_qa_4", "source": "0000/856/856349.ipynb_qa_4", "notebook": "0000/856/856349.ipynb", "difficulty": "medium", "instruction_sha256": "1e09d9a7fe835c9e29384332d173389ca4f7c94253771311c305bb1928635f29"},
|
| 127 |
+
{"name": "0000_862_862257_qa_5", "source": "0000/862/862257.ipynb_qa_5", "notebook": "0000/862/862257.ipynb", "difficulty": "hard", "instruction_sha256": "4a0a4312b4d4317884201814e1d2de398d6d1ec8cc5b76e3f7a79b4b9a2f7ee1"},
|
| 128 |
+
{"name": "0000_868_868084_qa_4", "source": "0000/868/868084.ipynb_qa_4", "notebook": "0000/868/868084.ipynb", "difficulty": "medium", "instruction_sha256": "ea8e3c0d1dc5da296a20c87caec90a0d70b8f5471f1f5fd8b506899f223138e4"},
|
| 129 |
+
{"name": "0000_903_903504_qa_3", "source": "0000/903/903504.ipynb_qa_3", "notebook": "0000/903/903504.ipynb", "difficulty": "medium", "instruction_sha256": "29e60737681a3783b9bd23ae666d48b8201246456f52d30132ee0050b60f8ac8"},
|
| 130 |
+
{"name": "0000_965_965367_qa_1", "source": "0000/965/965367.ipynb_qa_1", "notebook": "0000/965/965367.ipynb", "difficulty": "medium", "instruction_sha256": "6816747df4881b4bb6ce32cde598fe72bbaadd092cb5119ae339134102c4f348"},
|
| 131 |
+
{"name": "0000_965_965367_qa_2", "source": "0000/965/965367.ipynb_qa_2", "notebook": "0000/965/965367.ipynb", "difficulty": "medium", "instruction_sha256": "e49395a1842c7b131e2d145ca6fb0933a0c15052e15ac7311bf80bc1fba0711e"},
|
| 132 |
+
{"name": "0000_965_965367_qa_3", "source": "0000/965/965367.ipynb_qa_3", "notebook": "0000/965/965367.ipynb", "difficulty": "medium", "instruction_sha256": "474b8a360beb674a0de536b8df301383ffb909a721b39b5920b0412a3ada5d65"},
|
| 133 |
+
{"name": "0000_982_982214_qa_4", "source": "0000/982/982214.ipynb_qa_4", "notebook": "0000/982/982214.ipynb", "difficulty": "hard", "instruction_sha256": "8ce6f8f48e37de38aafe61a2d581bbf94e743d880dcdead194c1fa23c25aa89d"},
|
| 134 |
+
{"name": "0000_982_982214_qa_5", "source": "0000/982/982214.ipynb_qa_5", "notebook": "0000/982/982214.ipynb", "difficulty": "hard", "instruction_sha256": "6b0a9cc988d8a058809b310e74b2b5701eef666abc3b262715a36edb703dac7a"},
|
| 135 |
+
{"name": "0001_004_1004716_qa_5", "source": "0001/004/1004716.ipynb_qa_5", "notebook": "0001/004/1004716.ipynb", "difficulty": "medium", "instruction_sha256": "0fafb8b18a1c295c88082e0239ca2aea3830cabe109dfbec80f6673b136d2c4a"},
|
| 136 |
+
{"name": "0001_028_1028511_qa_3", "source": "0001/028/1028511.ipynb_qa_3", "notebook": "0001/028/1028511.ipynb", "difficulty": "hard", "instruction_sha256": "b5dac5cd464bc78ebb9592f22edfcd3f7499bad2425144ce4f84055043f6c6ab"},
|
| 137 |
+
{"name": "0001_043_1043420_qa_4", "source": "0001/043/1043420.ipynb_qa_4", "notebook": "0001/043/1043420.ipynb", "difficulty": "hard", "instruction_sha256": "c1bed5635cc7ad8c51427cee3b0f2418f370111be204e64258c9a19ef76c61f6"},
|
| 138 |
+
{"name": "0001_043_1043981_qa_3", "source": "0001/043/1043981.ipynb_qa_3", "notebook": "0001/043/1043981.ipynb", "difficulty": "hard", "instruction_sha256": "997c4417ac706b868b96fde55bc51f6cfb41a5b7a128904e8306e7f3e4da6c54"},
|
| 139 |
+
{"name": "0001_046_1046894_qa_2", "source": "0001/046/1046894.ipynb_qa_2", "notebook": "0001/046/1046894.ipynb", "difficulty": "hard", "instruction_sha256": "a18650c85945e4948b5440fe752d2f124a8ef75c8bac7741d774d08995f45719"},
|
| 140 |
+
{"name": "0001_046_1046894_qa_3", "source": "0001/046/1046894.ipynb_qa_3", "notebook": "0001/046/1046894.ipynb", "difficulty": "hard", "instruction_sha256": "bf8d039ac3da6a9c3e5b0fdd60f6cf5e91f3e686412f50a77efa95e5feeaa623"},
|
| 141 |
+
{"name": "0001_069_1069844_qa_2", "source": "0001/069/1069844.ipynb_qa_2", "notebook": "0001/069/1069844.ipynb", "difficulty": "medium", "instruction_sha256": "838761d0699ccb38146436237103695e44d753e9ba3783df958d815d82e1a025"},
|
| 142 |
+
{"name": "0001_090_1090831_qa_3", "source": "0001/090/1090831.ipynb_qa_3", "notebook": "0001/090/1090831.ipynb", "difficulty": "hard", "instruction_sha256": "39a053a0020b43cac6b6657d156bbe5cb5b32701d9419bd6dcea9ea8fd7b32fe"},
|
| 143 |
+
{"name": "0001_095_1095590_qa_3", "source": "0001/095/1095590.ipynb_qa_3", "notebook": "0001/095/1095590.ipynb", "difficulty": "medium", "instruction_sha256": "e157c394f248df37704749b03c4980cf63c6416eb4878619b80a9321874f7d0a"},
|
| 144 |
+
{"name": "0001_102_1102505_qa_1", "source": "0001/102/1102505.ipynb_qa_1", "notebook": "0001/102/1102505.ipynb", "difficulty": "medium", "instruction_sha256": "4abe08f4466db57272556c0b4632ef34b86161f9496b655b78a4f1e8aaef8dca"},
|
| 145 |
+
{"name": "0001_127_1127835_qa_2", "source": "0001/127/1127835.ipynb_qa_2", "notebook": "0001/127/1127835.ipynb", "difficulty": "hard", "instruction_sha256": "82f99890ae4960ddb82cf263da81b9f5e08759cb6d332c0ab148aaec67afb731"},
|
| 146 |
+
{"name": "0001_137_1137537_qa_3", "source": "0001/137/1137537.ipynb_qa_3", "notebook": "0001/137/1137537.ipynb", "difficulty": "hard", "instruction_sha256": "42eaa0e8a3c15efdfe5c04b022dcd43cbc55627286921224764626edb105ea6d"},
|
| 147 |
+
{"name": "0001_155_1155013_qa_2", "source": "0001/155/1155013.ipynb_qa_2", "notebook": "0001/155/1155013.ipynb", "difficulty": "medium", "instruction_sha256": "2fe4eb92819f25c1d37a2bf09052f9dda8794d836acbba8f12812b449b907911"},
|
| 148 |
+
{"name": "0001_155_1155013_qa_3", "source": "0001/155/1155013.ipynb_qa_3", "notebook": "0001/155/1155013.ipynb", "difficulty": "hard", "instruction_sha256": "91e9722d858487535f93aa0b0160858aa5916676cd675d4ed5377c10265cf26b"},
|
| 149 |
+
{"name": "0001_163_1163742_qa_1", "source": "0001/163/1163742.ipynb_qa_1", "notebook": "0001/163/1163742.ipynb", "difficulty": "hard", "instruction_sha256": "722485a71d9ac79b21771c1ecc8d49720c2d3b869a4d85fab1007f5ccb811744"},
|
| 150 |
+
{"name": "0001_163_1163742_qa_5", "source": "0001/163/1163742.ipynb_qa_5", "notebook": "0001/163/1163742.ipynb", "difficulty": "hard", "instruction_sha256": "7dc62cc314b1514cbe35b802e95a315f5f062ed4a18e5d1422357aaa9815c0f7"},
|
| 151 |
+
{"name": "0001_176_1176622_qa_1", "source": "0001/176/1176622.ipynb_qa_1", "notebook": "0001/176/1176622.ipynb", "difficulty": "medium", "instruction_sha256": "dbfc495af0c45110e712aba34f1a5398b5641f236a541566364c4f1a8735c0fc"},
|
| 152 |
+
{"name": "0001_181_1181828_qa_3", "source": "0001/181/1181828.ipynb_qa_3", "notebook": "0001/181/1181828.ipynb", "difficulty": "medium", "instruction_sha256": "9523d75f20c6562e8e0734fdc5855b11eb87c8c8ee54841309ebdd6b1fcdd048"},
|
| 153 |
+
{"name": "0001_188_1188888_qa_3", "source": "0001/188/1188888.ipynb_qa_3", "notebook": "0001/188/1188888.ipynb", "difficulty": "hard", "instruction_sha256": "ca96fcd878ce0fd8ab286683ba0a4f028a3842c97fe2418b943d903b9fd5b5f8"},
|
| 154 |
+
{"name": "0001_214_1214633_qa_4", "source": "0001/214/1214633.ipynb_qa_4", "notebook": "0001/214/1214633.ipynb", "difficulty": "medium", "instruction_sha256": "0f4ed63efd45b428f01828b6958f26f735078fa3de70558874354b69ddff154e"},
|
| 155 |
+
{"name": "0001_232_1232019_qa_4", "source": "0001/232/1232019.ipynb_qa_4", "notebook": "0001/232/1232019.ipynb", "difficulty": "hard", "instruction_sha256": "ba0a76a802c4dd2a0cb2e3392124bd574e22d932369dfc8e49a704eaff292160"},
|
| 156 |
+
{"name": "0001_233_1233959_qa_3", "source": "0001/233/1233959.ipynb_qa_3", "notebook": "0001/233/1233959.ipynb", "difficulty": "hard", "instruction_sha256": "330f0027e19f1ed16b4646923ff5b5d1e369cff4f77ff89ed44753d4fba36031"},
|
| 157 |
+
{"name": "0001_237_1237016_qa_1", "source": "0001/237/1237016.ipynb_qa_1", "notebook": "0001/237/1237016.ipynb", "difficulty": "medium", "instruction_sha256": "cba63fbc25ee575acc2838bd59f5eb8c1d3d2be8bd27505516705083d3c378aa"},
|
| 158 |
+
{"name": "0001_238_1238983_qa_2", "source": "0001/238/1238983.ipynb_qa_2", "notebook": "0001/238/1238983.ipynb", "difficulty": "medium", "instruction_sha256": "edfc76425a5d3ebdc2578557cfaca1f974b32f043b14601690744654557ca94a"},
|
| 159 |
+
{"name": "0001_242_1242706_qa_1", "source": "0001/242/1242706.ipynb_qa_1", "notebook": "0001/242/1242706.ipynb", "difficulty": "medium", "instruction_sha256": "c36dc0c58b996988c105ddbfb3a68333d9b33490f8fd3ee3f3d15bc58a563add"},
|
| 160 |
+
{"name": "0001_250_1250662_qa_1", "source": "0001/250/1250662.ipynb_qa_1", "notebook": "0001/250/1250662.ipynb", "difficulty": "medium", "instruction_sha256": "856b8a0a6f19dbae4ec1c3cb8924af0e76b6d8bb1bce27d53e5272cf6e3b53ac"},
|
| 161 |
+
{"name": "0001_250_1250662_qa_3", "source": "0001/250/1250662.ipynb_qa_3", "notebook": "0001/250/1250662.ipynb", "difficulty": "medium", "instruction_sha256": "0dd23bb948b52aaab3e85f9c48e2066f8e7e09efde78de864cfa9c7a5469e364"},
|
| 162 |
+
{"name": "0001_264_1264151_qa_2", "source": "0001/264/1264151.ipynb_qa_2", "notebook": "0001/264/1264151.ipynb", "difficulty": "medium", "instruction_sha256": "51d44403f57225e8d51cb0f467a5d99ae52c8105cdbbd4ee034885acf297428a"},
|
| 163 |
+
{"name": "0001_264_1264151_qa_3", "source": "0001/264/1264151.ipynb_qa_3", "notebook": "0001/264/1264151.ipynb", "difficulty": "medium", "instruction_sha256": "710ff6f875e40a87d338f54b5f15fea535f897ff9e8b501ad1d31e440f948e6a"},
|
| 164 |
+
{"name": "0001_269_1269679_qa_5", "source": "0001/269/1269679.ipynb_qa_5", "notebook": "0001/269/1269679.ipynb", "difficulty": "hard", "instruction_sha256": "144a03daaf7b90d481b732f6d078422ce9aa018642c8bf4abe36fbf3155b6b8c"},
|
| 165 |
+
{"name": "0001_273_1273208_qa_3", "source": "0001/273/1273208.ipynb_qa_3", "notebook": "0001/273/1273208.ipynb", "difficulty": "medium", "instruction_sha256": "6fb83f2bdbd7976be9e0c19aaedd3b65c92dbbb19ebf15e118b12fba0ad87b7c"},
|
| 166 |
+
{"name": "0001_296_1296784_qa_5", "source": "0001/296/1296784.ipynb_qa_5", "notebook": "0001/296/1296784.ipynb", "difficulty": "hard", "instruction_sha256": "fb1d4b9d73ec1f73a3833335f03e23e67ab2d14f68ae4eb568c83ecb0d66cf41"},
|
| 167 |
+
{"name": "0001_312_1312239_qa_5", "source": "0001/312/1312239.ipynb_qa_5", "notebook": "0001/312/1312239.ipynb", "difficulty": "medium", "instruction_sha256": "87b33ab8856dad1de9ff210b679d980fb0902614432db1289f493eaad3cd6ec1"},
|
| 168 |
+
{"name": "0001_325_1325110_qa_4", "source": "0001/325/1325110.ipynb_qa_4", "notebook": "0001/325/1325110.ipynb", "difficulty": "medium", "instruction_sha256": "cbe2f999b974327095f42c5917614145ec964724fd2810c100a26158be8ee843"},
|
| 169 |
+
{"name": "0001_325_1325260_qa_1", "source": "0001/325/1325260.ipynb_qa_1", "notebook": "0001/325/1325260.ipynb", "difficulty": "medium", "instruction_sha256": "06635327abeea0bd5897b11420ad334cefe2d4b2a6a4195f0df39388c7898ce9"},
|
| 170 |
+
{"name": "0001_333_1333685_qa_2", "source": "0001/333/1333685.ipynb_qa_2", "notebook": "0001/333/1333685.ipynb", "difficulty": "medium", "instruction_sha256": "af4d45f475874e49779a0e422cf2a44ca7aa898eb5dba75acfcb3be74ca16f5c"},
|
| 171 |
+
{"name": "0001_341_1341821_qa_4", "source": "0001/341/1341821.ipynb_qa_4", "notebook": "0001/341/1341821.ipynb", "difficulty": "medium", "instruction_sha256": "441857e97034ee06adfd44de3c8ba153571c86ab8e371ab669eec14c2a4ec4b6"},
|
| 172 |
+
{"name": "0001_347_1347384_qa_1", "source": "0001/347/1347384.ipynb_qa_1", "notebook": "0001/347/1347384.ipynb", "difficulty": "medium", "instruction_sha256": "f15076959c13118fb4b4f7b8e1c1e3cce5bf2119e8bdad4639618f659dd6f326"},
|
| 173 |
+
{"name": "0001_364_1364973_qa_2", "source": "0001/364/1364973.ipynb_qa_2", "notebook": "0001/364/1364973.ipynb", "difficulty": "medium", "instruction_sha256": "e7a54d2480a8261e20ae54c08c0826e171df5b36d2e9413462fc58333cbca24b"},
|
| 174 |
+
{"name": "0001_365_1365152_qa_1", "source": "0001/365/1365152.ipynb_qa_1", "notebook": "0001/365/1365152.ipynb", "difficulty": "hard", "instruction_sha256": "4c949bc61c05ead7427f41b6432a89c2bcc1cbd52371812f0755097d41be3faf"},
|
| 175 |
+
{"name": "0001_381_1381379_qa_2", "source": "0001/381/1381379.ipynb_qa_2", "notebook": "0001/381/1381379.ipynb", "difficulty": "medium", "instruction_sha256": "7c21434aa1d22af52db0d88bcb93863fda79bddc7f62dfa8546541581bb08e89"},
|
| 176 |
+
{"name": "0001_404_1404790_qa_5", "source": "0001/404/1404790.ipynb_qa_5", "notebook": "0001/404/1404790.ipynb", "difficulty": "hard", "instruction_sha256": "3116b3f4848a11b7d80d0ccdf720ff1a1595da30df17e4419b5a9aa5bf8a8554"},
|
| 177 |
+
{"name": "0001_436_1436410_qa_4", "source": "0001/436/1436410.ipynb_qa_4", "notebook": "0001/436/1436410.ipynb", "difficulty": "medium", "instruction_sha256": "a71d099d9eb856c7dee8fe1cecb8b54dddf83a185e93d3e0f76aa69af1edaeb0"},
|
| 178 |
+
{"name": "0001_439_1439907_qa_3", "source": "0001/439/1439907.ipynb_qa_3", "notebook": "0001/439/1439907.ipynb", "difficulty": "medium", "instruction_sha256": "bce2b562750901aca9a0f390bd443ed412c77f3e80fabe691e2e360c79a47431"},
|
| 179 |
+
{"name": "0001_441_1441202_qa_4", "source": "0001/441/1441202.ipynb_qa_4", "notebook": "0001/441/1441202.ipynb", "difficulty": "hard", "instruction_sha256": "b9817f1c748eaa954e2dcbc97d768dac43ba56fbe93654a89acff0720c7a2bc5"},
|
| 180 |
+
{"name": "0001_443_1443137_qa_3", "source": "0001/443/1443137.ipynb_qa_3", "notebook": "0001/443/1443137.ipynb", "difficulty": "medium", "instruction_sha256": "ddf913a66e2981749b73131c7d243e94022b176be2bec0e78c6941c741428220"},
|
| 181 |
+
{"name": "0001_445_1445988_qa_2", "source": "0001/445/1445988.ipynb_qa_2", "notebook": "0001/445/1445988.ipynb", "difficulty": "hard", "instruction_sha256": "a0f71504c474fab7356714ba844f7a4f3577ac51d322229f5332d92149656b6c"},
|
| 182 |
+
{"name": "0001_446_1446067_qa_1", "source": "0001/446/1446067.ipynb_qa_1", "notebook": "0001/446/1446067.ipynb", "difficulty": "hard", "instruction_sha256": "ed4d597ef6df8f6aaf0aa76369919569c49af37dc20c8687b75c798e49b185e5"},
|
| 183 |
+
{"name": "0001_446_1446695_qa_3", "source": "0001/446/1446695.ipynb_qa_3", "notebook": "0001/446/1446695.ipynb", "difficulty": "medium", "instruction_sha256": "19b3ad1506cf88e5e99d8ee8864a5b7c5838b5a70019369c445aaeaa2acd2e32"},
|
| 184 |
+
{"name": "0001_466_1466571_qa_1", "source": "0001/466/1466571.ipynb_qa_1", "notebook": "0001/466/1466571.ipynb", "difficulty": "medium", "instruction_sha256": "a2b3eef5a1d70646e315f84abfd84b7284169dc5d59349f82312d99514aeca16"},
|
| 185 |
+
{"name": "0001_481_1481274_qa_3", "source": "0001/481/1481274.ipynb_qa_3", "notebook": "0001/481/1481274.ipynb", "difficulty": "hard", "instruction_sha256": "c22a2070c360c06e7ace1973566b3c512ebb4f98ca1eefb289e224d3f065bb0d"},
|
| 186 |
+
{"name": "0001_487_1487950_qa_5", "source": "0001/487/1487950.ipynb_qa_5", "notebook": "0001/487/1487950.ipynb", "difficulty": "medium", "instruction_sha256": "545722def39cdec59a4f25010308c6935a5779437c2819760a81522100c3ea53"},
|
| 187 |
+
{"name": "0001_490_1490464_qa_3", "source": "0001/490/1490464.ipynb_qa_3", "notebook": "0001/490/1490464.ipynb", "difficulty": "medium", "instruction_sha256": "292718ad58c6169403cd70a769f6d633b8f638a848f04a6fcf3866c4f8347f1d"},
|
| 188 |
+
{"name": "0001_497_1497755_qa_4", "source": "0001/497/1497755.ipynb_qa_4", "notebook": "0001/497/1497755.ipynb", "difficulty": "hard", "instruction_sha256": "3496acd25633477adbe148a2463880843546cf23bdb22cdaef0653965024f0f9"},
|
| 189 |
+
{"name": "0001_505_1505707_qa_1", "source": "0001/505/1505707.ipynb_qa_1", "notebook": "0001/505/1505707.ipynb", "difficulty": "hard", "instruction_sha256": "9c026b86ed13305dc74184292a99b8a2b308725e4a0e35d312e24d4b8c90804c"},
|
| 190 |
+
{"name": "0001_526_1526465_qa_2", "source": "0001/526/1526465.ipynb_qa_2", "notebook": "0001/526/1526465.ipynb", "difficulty": "hard", "instruction_sha256": "3a8d7f0f42717081e88d3fdef068a9320732dc354d1f96277636898aa12b4615"},
|
| 191 |
+
{"name": "0001_527_1527107_qa_4", "source": "0001/527/1527107.ipynb_qa_4", "notebook": "0001/527/1527107.ipynb", "difficulty": "medium", "instruction_sha256": "6f7f953d21fcdbebb6b16d65edea41203cb94d04d2a9731cb264229f1dcb9e68"},
|
| 192 |
+
{"name": "0001_530_1530114_qa_1", "source": "0001/530/1530114.ipynb_qa_1", "notebook": "0001/530/1530114.ipynb", "difficulty": "medium", "instruction_sha256": "78ff74f9f28f71888fa33257bc25a2fbf6cfda045f17e965049da913e60262b2"},
|
| 193 |
+
{"name": "0001_532_1532354_qa_3", "source": "0001/532/1532354.ipynb_qa_3", "notebook": "0001/532/1532354.ipynb", "difficulty": "medium", "instruction_sha256": "88dea3f2d0be4d0e062c67aafaa84001376bd3fdf96afff063e28426bed20845"},
|
| 194 |
+
{"name": "0001_533_1533644_qa_3", "source": "0001/533/1533644.ipynb_qa_3", "notebook": "0001/533/1533644.ipynb", "difficulty": "hard", "instruction_sha256": "522650762f2063ed143b8782977475d5313d0efc15f281abb1f7dec69adf7ee1"},
|
| 195 |
+
{"name": "0001_541_1541084_qa_3", "source": "0001/541/1541084.ipynb_qa_3", "notebook": "0001/541/1541084.ipynb", "difficulty": "medium", "instruction_sha256": "6b227926e2cd6a3892297c0e3fab6f0947990c650bfe80d637ae9c0076c3c05d"},
|
| 196 |
+
{"name": "0001_545_1545936_qa_2", "source": "0001/545/1545936.ipynb_qa_2", "notebook": "0001/545/1545936.ipynb", "difficulty": "medium", "instruction_sha256": "fe631c21c45a6b452f5964a6fbf9ecc01f8cd24bfc9151abc8865d38a694e561"},
|
| 197 |
+
{"name": "0001_570_1570721_qa_4", "source": "0001/570/1570721.ipynb_qa_4", "notebook": "0001/570/1570721.ipynb", "difficulty": "hard", "instruction_sha256": "eb32513b83e397a1a88d9ff073ecb1a31c66056dca2b1ba7c4f658983419e8fc"},
|
| 198 |
+
{"name": "0001_570_1570721_qa_5", "source": "0001/570/1570721.ipynb_qa_5", "notebook": "0001/570/1570721.ipynb", "difficulty": "hard", "instruction_sha256": "a736fcdcf7407ac5367d7a7df9114290a4289da852f35c39e1ecd61f525dacf2"},
|
| 199 |
+
{"name": "0001_602_1602735_qa_3", "source": "0001/602/1602735.ipynb_qa_3", "notebook": "0001/602/1602735.ipynb", "difficulty": "hard", "instruction_sha256": "8005b14ddb96e5d55dcccf05d3eb3c8450b0bd0a727f72fead9d9e0bcf363d94"},
|
| 200 |
+
{"name": "0001_632_1632381_qa_1", "source": "0001/632/1632381.ipynb_qa_1", "notebook": "0001/632/1632381.ipynb", "difficulty": "hard", "instruction_sha256": "311fb38f89fde5e7c47c2997ea1247cfe4c1417b3247088837f54804edd8200f"},
|
| 201 |
+
{"name": "0001_638_1638152_qa_5", "source": "0001/638/1638152.ipynb_qa_5", "notebook": "0001/638/1638152.ipynb", "difficulty": "hard", "instruction_sha256": "518e685a36ef006fb519af29e1941ee36aae3510ca522689041c2a73a5ca9cf1"},
|
| 202 |
+
{"name": "0001_640_1640467_qa_2", "source": "0001/640/1640467.ipynb_qa_2", "notebook": "0001/640/1640467.ipynb", "difficulty": "hard", "instruction_sha256": "43fed3cf658f70d92ee5c253dd8eb8cc9f10405412fbef0a33c3b2863663c684"},
|
| 203 |
+
{"name": "0001_665_1665514_qa_2", "source": "0001/665/1665514.ipynb_qa_2", "notebook": "0001/665/1665514.ipynb", "difficulty": "hard", "instruction_sha256": "24393c1db5b9440fb89b3ceda99646d5c2f5fcff5269d7532737b29a77a44dc3"},
|
| 204 |
+
{"name": "0001_668_1668567_qa_4", "source": "0001/668/1668567.ipynb_qa_4", "notebook": "0001/668/1668567.ipynb", "difficulty": "hard", "instruction_sha256": "2f44a2179a399d502dd54b67e280d48e231f8503c9f3df2ce9c724394ce3e1c9"},
|
| 205 |
+
{"name": "0001_669_1669063_qa_3", "source": "0001/669/1669063.ipynb_qa_3", "notebook": "0001/669/1669063.ipynb", "difficulty": "hard", "instruction_sha256": "03244124453c72910872ad5f0867981b1a5acfee8091014eca187870380b5cd0"},
|
| 206 |
+
{"name": "0001_672_1672543_qa_5", "source": "0001/672/1672543.ipynb_qa_5", "notebook": "0001/672/1672543.ipynb", "difficulty": "hard", "instruction_sha256": "1ba665756c4f3fcb0d07f2abdc7a9853170e4c81642b9fff058c5bc10a127c24"},
|
| 207 |
+
{"name": "0001_696_1696691_qa_1", "source": "0001/696/1696691.ipynb_qa_1", "notebook": "0001/696/1696691.ipynb", "difficulty": "hard", "instruction_sha256": "6c14738467827b31deda06561554f1c3521fd11647a4ab5a848d26927d847787"},
|
| 208 |
+
{"name": "0001_696_1696691_qa_3", "source": "0001/696/1696691.ipynb_qa_3", "notebook": "0001/696/1696691.ipynb", "difficulty": "hard", "instruction_sha256": "3cb33e4394b6837aa9942b597b5e88f2fdb1f65ff80a1e98cfd15653ec76c8b7"},
|
| 209 |
+
{"name": "0001_727_1727043_qa_4", "source": "0001/727/1727043.ipynb_qa_4", "notebook": "0001/727/1727043.ipynb", "difficulty": "hard", "instruction_sha256": "429ffd1a334140546f178c4f4018e23e43532f13175dc7ea15684c0bd0cd3bbc"},
|
| 210 |
+
{"name": "0001_757_1757917_qa_3", "source": "0001/757/1757917.ipynb_qa_3", "notebook": "0001/757/1757917.ipynb", "difficulty": "hard", "instruction_sha256": "a27ba8c5f95a5f3526c800182637473d31ce521f96ccc7a0e7bf754ade0b8a7c"},
|
| 211 |
+
{"name": "0001_770_1770623_qa_1", "source": "0001/770/1770623.ipynb_qa_1", "notebook": "0001/770/1770623.ipynb", "difficulty": "hard", "instruction_sha256": "1f234bae8511b49bedfe4bd30176e7d1a4c31bedf2ea5cdf85f559f75559b942"},
|
| 212 |
+
{"name": "0001_875_1875067_qa_3", "source": "0001/875/1875067.ipynb_qa_3", "notebook": "0001/875/1875067.ipynb", "difficulty": "hard", "instruction_sha256": "0a7f4c30e394b577f8b0222c643047494a68d82bd0b17d859f9924a4139539c5"},
|
| 213 |
+
{"name": "0001_892_1892658_qa_3", "source": "0001/892/1892658.ipynb_qa_3", "notebook": "0001/892/1892658.ipynb", "difficulty": "hard", "instruction_sha256": "fc99f18b9f27e2c5aa143bed56acffe6e6897b68f5435c78659e456c24e0640e"},
|
| 214 |
+
{"name": "0001_893_1893978_qa_5", "source": "0001/893/1893978.ipynb_qa_5", "notebook": "0001/893/1893978.ipynb", "difficulty": "hard", "instruction_sha256": "73b861c118c1bdf4a9bf5cac14f52422f69f4412de02e3c9338552542689e31a"},
|
| 215 |
+
{"name": "0001_895_1895893_qa_2", "source": "0001/895/1895893.ipynb_qa_2", "notebook": "0001/895/1895893.ipynb", "difficulty": "hard", "instruction_sha256": "6132d4a5dcb443f53cb6d53348a1a76d56d95b9af841f88f42f9f847f934f92b"},
|
| 216 |
+
{"name": "0001_903_1903634_qa_1", "source": "0001/903/1903634.ipynb_qa_1", "notebook": "0001/903/1903634.ipynb", "difficulty": "hard", "instruction_sha256": "9943c21454817f59a1b0a64a64802d7d7d3d876a63e3bb9a8ef7a17fdcedfc80"},
|
| 217 |
+
{"name": "0001_903_1903634_qa_4", "source": "0001/903/1903634.ipynb_qa_4", "notebook": "0001/903/1903634.ipynb", "difficulty": "hard", "instruction_sha256": "bc69bbc99fe61207b27eda417f0304091e95c82f18bd8c3d69505ce0e6203456"},
|
| 218 |
+
{"name": "0001_903_1903634_qa_5", "source": "0001/903/1903634.ipynb_qa_5", "notebook": "0001/903/1903634.ipynb", "difficulty": "hard", "instruction_sha256": "dfd05c52775022a3a62f8506c5124e61d2264900a31bc742d6969f5c8da7d1a7"},
|
| 219 |
+
{"name": "0001_904_1904638_qa_1", "source": "0001/904/1904638.ipynb_qa_1", "notebook": "0001/904/1904638.ipynb", "difficulty": "hard", "instruction_sha256": "47a1a9cfe9326e2f6bfc7592637a473eb2c195fc31f0e722f3a176d60be32baf"},
|
| 220 |
+
{"name": "0001_904_1904638_qa_2", "source": "0001/904/1904638.ipynb_qa_2", "notebook": "0001/904/1904638.ipynb", "difficulty": "hard", "instruction_sha256": "69c8eedddd4580a3cb1ac73d6b93911b7e3be20aea7d8d7079fac7dae148785d"},
|
| 221 |
+
{"name": "0001_912_1912867_qa_2", "source": "0001/912/1912867.ipynb_qa_2", "notebook": "0001/912/1912867.ipynb", "difficulty": "hard", "instruction_sha256": "7d7d5fe2651b4ab7cb0f28d7f5b07fd249e4d64c136e68a4f91bd30923042925"},
|
| 222 |
+
{"name": "0001_912_1912867_qa_5", "source": "0001/912/1912867.ipynb_qa_5", "notebook": "0001/912/1912867.ipynb", "difficulty": "hard", "instruction_sha256": "03e34fcaeab8293895ab6769b24729fceae98e25c019963214c9cd56b1514de8"},
|
| 223 |
+
{"name": "0001_918_1918012_qa_1", "source": "0001/918/1918012.ipynb_qa_1", "notebook": "0001/918/1918012.ipynb", "difficulty": "hard", "instruction_sha256": "413ec54174c4fee088e32ea8fa2304eab6383ead00a0ad8b649d02c8ff19d060"},
|
| 224 |
+
{"name": "0001_922_1922748_qa_4", "source": "0001/922/1922748.ipynb_qa_4", "notebook": "0001/922/1922748.ipynb", "difficulty": "hard", "instruction_sha256": "1d0234376e455d67f95f2e112ab1e9be75814ecf85182614d60292529cca4cec"},
|
| 225 |
+
{"name": "0001_991_1991000_qa_3", "source": "0001/991/1991000.ipynb_qa_3", "notebook": "0001/991/1991000.ipynb", "difficulty": "hard", "instruction_sha256": "1cb0f2552b0eff9384273ded32b00f1a609f5840dd1ff516ee6b2820f434b55f"},
|
| 226 |
+
{"name": "0001_991_1991376_qa_1", "source": "0001/991/1991376.ipynb_qa_1", "notebook": "0001/991/1991376.ipynb", "difficulty": "hard", "instruction_sha256": "3e7e7c3a681602573090f8446187bbe6615ee1c5a043733c59b7231b075468ad"},
|
| 227 |
+
{"name": "0001_991_1991376_qa_5", "source": "0001/991/1991376.ipynb_qa_5", "notebook": "0001/991/1991376.ipynb", "difficulty": "hard", "instruction_sha256": "a0aba7aa773ec3c3352f677b70131c33083b135e3d0bd776d525a3f81ecfb435"},
|
| 228 |
+
{"name": "0002_134_2134700_qa_5", "source": "0002/134/2134700.ipynb_qa_5", "notebook": "0002/134/2134700.ipynb", "difficulty": "hard", "instruction_sha256": "d2bd38963709deb5780643df0b05fd1bb8491da390a3c0b400ae35fc8d16db54"},
|
| 229 |
+
{"name": "0002_169_2169008_qa_1", "source": "0002/169/2169008.ipynb_qa_1", "notebook": "0002/169/2169008.ipynb", "difficulty": "hard", "instruction_sha256": "1ec8adf67ef5d0bbf5bc364bbc7c51a06815f721736560d9a664997f756bf100"},
|
| 230 |
+
{"name": "0002_187_2187459_qa_3", "source": "0002/187/2187459.ipynb_qa_3", "notebook": "0002/187/2187459.ipynb", "difficulty": "hard", "instruction_sha256": "70b17eebda3078b92ef0b110633ced726155d4722af943a520dcdf021b09e645"},
|
| 231 |
+
{"name": "0002_189_2189266_qa_2", "source": "0002/189/2189266.ipynb_qa_2", "notebook": "0002/189/2189266.ipynb", "difficulty": "hard", "instruction_sha256": "57caf0bf7a5e06ccbf95d0749c7456e092cb472e32ea7d54e3ddc29795b22548"},
|
| 232 |
+
{"name": "0014_516_14516985_qa_4", "source": "0014/516/14516985.ipynb_qa_4", "notebook": "0014/516/14516985.ipynb", "difficulty": "hard", "instruction_sha256": "6097e844a6f616ec28fc8c8ddcd5defd6d794cd01c729d66ada1c2aa4a30812e"},
|
| 233 |
+
{"name": "0032_521_32521554_qa_3", "source": "0032/521/32521554.ipynb_qa_3", "notebook": "0032/521/32521554.ipynb", "difficulty": "hard", "instruction_sha256": "67a31e3f106b773fd6c1225f700f30be451668cac4a0aebebc57e2f261bb9571"},
|
| 234 |
+
{"name": "0036_284_36284344_qa_5", "source": "0036/284/36284344.ipynb_qa_5", "notebook": "0036/284/36284344.ipynb", "difficulty": "hard", "instruction_sha256": "dc64eec5ba515a04b10f692ec9a102389309c2d2015995e5de59f61645fcb49b"},
|
| 235 |
+
{"name": "0041_214_41214590_qa_4", "source": "0041/214/41214590.ipynb_qa_4", "notebook": "0041/214/41214590.ipynb", "difficulty": "hard", "instruction_sha256": "1b60982b46ee4257d89781b0d8411fd5e9de960223680028457bce8f002f2316"},
|
| 236 |
+
{"name": "0048_996_48996091_qa_5", "source": "0048/996/48996091.ipynb_qa_5", "notebook": "0048/996/48996091.ipynb", "difficulty": "hard", "instruction_sha256": "adf2ebed947e03a15c108ed522b720b068371f65629c7c9f719e2a6c877ba745"},
|
| 237 |
+
{"name": "0049_302_49302290_qa_3", "source": "0049/302/49302290.ipynb_qa_3", "notebook": "0049/302/49302290.ipynb", "difficulty": "hard", "instruction_sha256": "ba6cf04cb5182218a7bdffb662e3384bfc9cb9c38b367c37849a9eb2b42fa3b6"},
|
| 238 |
+
{"name": "0051_018_51018932_qa_4", "source": "0051/018/51018932.ipynb_qa_4", "notebook": "0051/018/51018932.ipynb", "difficulty": "hard", "instruction_sha256": "299852a89a08120ce05b91762ce1e13467107d00c3eb23ffd76c24fc5a774612"},
|
| 239 |
+
{"name": "0060_085_60085489_qa_4", "source": "0060/085/60085489.ipynb_qa_4", "notebook": "0060/085/60085489.ipynb", "difficulty": "hard", "instruction_sha256": "db2a6a0d4db73ddfce498cb4bae9542c73849ccb39fa6d43862bbee0457858c9"},
|
| 240 |
+
{"name": "0064_089_64089732_qa_5", "source": "0064/089/64089732.ipynb_qa_5", "notebook": "0064/089/64089732.ipynb", "difficulty": "hard", "instruction_sha256": "01459031a14193b4fbe987f4e4c1466488f33b4283451476e04dda4d5906aab1"},
|
| 241 |
+
{"name": "0065_262_65262139_qa_5", "source": "0065/262/65262139.ipynb_qa_5", "notebook": "0065/262/65262139.ipynb", "difficulty": "hard", "instruction_sha256": "0ab09f6bd0d928239f60bcde97931436721925aa77348c2d91ca342518cbb68e"},
|
| 242 |
+
{"name": "0075_374_75374659_qa_2", "source": "0075/374/75374659.ipynb_qa_2", "notebook": "0075/374/75374659.ipynb", "difficulty": "hard", "instruction_sha256": "3323a5edef46c2ffe235d7a7a215cfecda1601808e48ae91eabecffa13f65ab0"},
|
| 243 |
+
{"name": "0092_637_92637915_qa_2", "source": "0092/637/92637915.ipynb_qa_2", "notebook": "0092/637/92637915.ipynb", "difficulty": "hard", "instruction_sha256": "902721593434f0b3ed7435c7ac9c0c2d09799697e1aa03e4f33f3b7ab141ba53"},
|
| 244 |
+
{"name": "0096_776_96776427_qa_5", "source": "0096/776/96776427.ipynb_qa_5", "notebook": "0096/776/96776427.ipynb", "difficulty": "hard", "instruction_sha256": "cb45bd02629e73b9fc7ea3629d1300a521ec74b9bcb89392ae59e8792cc1356d"},
|
| 245 |
+
{"name": "0099_089_99089980_qa_5", "source": "0099/089/99089980.ipynb_qa_5", "notebook": "0099/089/99089980.ipynb", "difficulty": "hard", "instruction_sha256": "e934a92dd25e11ac99781af75ab5433c4c8804cfb8a4fd4ead47b9b24b954227"},
|
| 246 |
+
{"name": "0104_079_104079493_qa_4", "source": "0104/079/104079493.ipynb_qa_4", "notebook": "0104/079/104079493.ipynb", "difficulty": "hard", "instruction_sha256": "906e1a55aec2a70fa6c5310a87f36d0d6121fbce5c3ac32a4641f1c765d0c06d"},
|
| 247 |
+
{"name": "0115_735_115735943_qa_1", "source": "0115/735/115735943.ipynb_qa_1", "notebook": "0115/735/115735943.ipynb", "difficulty": "hard", "instruction_sha256": "dbfafc2ca0f02cbc4b1e07e68b62efde9450653099780475121f1304c465b269"},
|
| 248 |
+
{"name": "0117_122_117122383_qa_3", "source": "0117/122/117122383.ipynb_qa_3", "notebook": "0117/122/117122383.ipynb", "difficulty": "hard", "instruction_sha256": "bd17eea23c6cb3ae28e35ede16102611d27634015e351807154ff37fe43cb4b1"},
|
| 249 |
+
{"name": "0122_938_122938717_qa_4", "source": "0122/938/122938717.ipynb_qa_4", "notebook": "0122/938/122938717.ipynb", "difficulty": "hard", "instruction_sha256": "ba8b1221265a98d6ced0f68c49dd8fb8ea04e2afc03733b77475c3ee98ec353c"},
|
| 250 |
+
{"name": "0126_223_126223416_qa_5", "source": "0126/223/126223416.ipynb_qa_5", "notebook": "0126/223/126223416.ipynb", "difficulty": "hard", "instruction_sha256": "bf9fdef8013dfd12241731291f01a41c77d85f4f0f423f4612147d71949a74f2"},
|
| 251 |
+
{"name": "0138_500_138500445_qa_1", "source": "0138/500/138500445.ipynb_qa_1", "notebook": "0138/500/138500445.ipynb", "difficulty": "hard", "instruction_sha256": "f1ecbcaab9a48a1ab5481192443d0749968e40988ca0f7df06ffc13230ac5277"}
|
| 252 |
+
]
|
data/train.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
deploy.py
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Upload this standalone directory to a Docker Space."""
|
| 2 |
+
|
| 3 |
+
import argparse
|
| 4 |
+
from pathlib import Path
|
| 5 |
+
|
| 6 |
+
from huggingface_hub import HfApi
|
| 7 |
+
|
| 8 |
+
ROOT = Path(__file__).resolve().parent
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
def main():
|
| 12 |
+
parser = argparse.ArgumentParser(description=__doc__)
|
| 13 |
+
parser.add_argument("--repo", required=True)
|
| 14 |
+
parser.add_argument("--public", action="store_true")
|
| 15 |
+
parser.add_argument("--concurrency", type=int)
|
| 16 |
+
args = parser.parse_args()
|
| 17 |
+
if args.concurrency is not None and args.concurrency < 1:
|
| 18 |
+
parser.error("Concurrency must be positive")
|
| 19 |
+
api = HfApi()
|
| 20 |
+
api.create_repo(
|
| 21 |
+
args.repo,
|
| 22 |
+
repo_type="space",
|
| 23 |
+
space_sdk="docker",
|
| 24 |
+
private=not args.public,
|
| 25 |
+
exist_ok=True,
|
| 26 |
+
)
|
| 27 |
+
variables = api.get_space_variables(args.repo)
|
| 28 |
+
concurrency = args.concurrency or (
|
| 29 |
+
int(variables["MAX_CONCURRENT_ENVS"].value)
|
| 30 |
+
if "MAX_CONCURRENT_ENVS" in variables
|
| 31 |
+
else 40
|
| 32 |
+
)
|
| 33 |
+
api.add_space_variable(args.repo, "MAX_CONCURRENT_ENVS", str(concurrency))
|
| 34 |
+
api.add_space_variable(args.repo, "ENABLE_WEB_INTERFACE", "true")
|
| 35 |
+
api.upload_folder(
|
| 36 |
+
repo_id=args.repo,
|
| 37 |
+
repo_type="space",
|
| 38 |
+
folder_path=ROOT,
|
| 39 |
+
allow_patterns=[
|
| 40 |
+
"*.py",
|
| 41 |
+
"*.json",
|
| 42 |
+
"*.toml",
|
| 43 |
+
"*.txt",
|
| 44 |
+
"*.sh",
|
| 45 |
+
"*.yaml",
|
| 46 |
+
"README.md",
|
| 47 |
+
"Dockerfile",
|
| 48 |
+
".dockerignore",
|
| 49 |
+
".gitignore",
|
| 50 |
+
".gitattributes",
|
| 51 |
+
],
|
| 52 |
+
ignore_patterns=[
|
| 53 |
+
".deps/**",
|
| 54 |
+
".venv/**",
|
| 55 |
+
"prepared/**",
|
| 56 |
+
".archive/**",
|
| 57 |
+
"**/__pycache__/**",
|
| 58 |
+
"**/*.egg-info/**",
|
| 59 |
+
".env",
|
| 60 |
+
".git/**",
|
| 61 |
+
],
|
| 62 |
+
commit_message="Deploy standalone SmolDataEnv Native OpenCode",
|
| 63 |
+
)
|
| 64 |
+
print(f"https://huggingface.co/spaces/{args.repo}")
|
| 65 |
+
|
| 66 |
+
|
| 67 |
+
if __name__ == "__main__":
|
| 68 |
+
main()
|
install.sh
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
set -euo pipefail
|
| 3 |
+
cd "$(dirname "$0")"
|
| 4 |
+
mkdir -p .deps
|
| 5 |
+
if [[ ! -d .deps/OpenEnv/.git ]]; then
|
| 6 |
+
git clone --depth 1 https://github.com/huggingface/OpenEnv.git .deps/OpenEnv
|
| 7 |
+
else
|
| 8 |
+
git -C .deps/OpenEnv pull --ff-only origin main
|
| 9 |
+
fi
|
| 10 |
+
python -m pip install -e .deps/OpenEnv -r requirements.txt
|
| 11 |
+
python -m pip install --no-deps -e .
|
| 12 |
+
python - <<'SETUP'
|
| 13 |
+
from pathlib import Path
|
| 14 |
+
import site
|
| 15 |
+
Path(site.getsitepackages()[0], "openenv_examples.pth").write_text(
|
| 16 |
+
str(Path(".deps/OpenEnv/envs").resolve()) + "\n"
|
| 17 |
+
)
|
| 18 |
+
SETUP
|
openenv.yaml
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
spec_version: 1
|
| 2 |
+
name: smoldataenv_opencode
|
| 3 |
+
type: space
|
| 4 |
+
runtime: fastapi
|
| 5 |
+
app: smoldataenv_opencode.server:app
|
| 6 |
+
port: 7860
|
prepare.py
ADDED
|
@@ -0,0 +1,138 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Materialize the fixed train/test tasks from corrected, pinned Harbor datasets."""
|
| 2 |
+
|
| 3 |
+
from __future__ import annotations
|
| 4 |
+
|
| 5 |
+
import argparse
|
| 6 |
+
import hashlib
|
| 7 |
+
import json
|
| 8 |
+
import shutil
|
| 9 |
+
from pathlib import Path
|
| 10 |
+
|
| 11 |
+
import tomllib
|
| 12 |
+
|
| 13 |
+
ROOT = Path(__file__).resolve().parent
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
def task_rows(split):
|
| 17 |
+
return json.loads((ROOT / "data" / f"{split}.json").read_text())
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
def write_json(path, data):
|
| 21 |
+
path.parent.mkdir(parents=True, exist_ok=True)
|
| 22 |
+
path.write_text(json.dumps(data, indent=2) + "\n")
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
DATASETS = {
|
| 26 |
+
"train": (
|
| 27 |
+
"FineEnvs/SmolDataEnvs-harbor-train",
|
| 28 |
+
"4719635555de1666f374d847baebb500d368e493",
|
| 29 |
+
),
|
| 30 |
+
"test": (
|
| 31 |
+
"FineEnvs/SmolDataEnvs-harbor-test",
|
| 32 |
+
"b130595b579fc6026ad5762925a9a3b40e72f5bb",
|
| 33 |
+
),
|
| 34 |
+
}
|
| 35 |
+
GRADER_SHA256 = "16f906e9248fa8b7e1141939e425e88e59d52d65e98e360bbacef3720a43629f"
|
| 36 |
+
|
| 37 |
+
|
| 38 |
+
def prepare(destination, sources=None):
|
| 39 |
+
import tomli_w
|
| 40 |
+
from huggingface_hub import snapshot_download
|
| 41 |
+
|
| 42 |
+
destination = Path(destination).resolve()
|
| 43 |
+
manifests = {}
|
| 44 |
+
for split in ("train", "test"):
|
| 45 |
+
rows = task_rows(split)
|
| 46 |
+
repo, revision = DATASETS[split]
|
| 47 |
+
source = (sources or {}).get(split)
|
| 48 |
+
if source is None:
|
| 49 |
+
source = snapshot_download(
|
| 50 |
+
repo,
|
| 51 |
+
repo_type="dataset",
|
| 52 |
+
revision=revision,
|
| 53 |
+
allow_patterns=[f"tasks/{r['name']}/*" for r in rows],
|
| 54 |
+
max_workers=16,
|
| 55 |
+
)
|
| 56 |
+
source = Path(source)
|
| 57 |
+
tasks = []
|
| 58 |
+
for row in rows:
|
| 59 |
+
folder = source / "tasks" / row["name"]
|
| 60 |
+
instruction = (folder / "instruction.md").read_bytes()
|
| 61 |
+
if hashlib.sha256(instruction).hexdigest() != row["instruction_sha256"]:
|
| 62 |
+
raise ValueError(
|
| 63 |
+
f"Historical task instruction changed: {split}/{row['name']}"
|
| 64 |
+
)
|
| 65 |
+
grader = (folder / "tests/grader.py").read_bytes()
|
| 66 |
+
if hashlib.sha256(grader).hexdigest() != GRADER_SHA256:
|
| 67 |
+
raise ValueError(
|
| 68 |
+
f"Expected corrected numeric-only Harbor grader: {folder}"
|
| 69 |
+
)
|
| 70 |
+
target = destination / "datasets" / split / "tasks" / row["name"]
|
| 71 |
+
target.mkdir(parents=True, exist_ok=True)
|
| 72 |
+
for rel in (
|
| 73 |
+
"instruction.md",
|
| 74 |
+
"task.toml",
|
| 75 |
+
"environment/Dockerfile",
|
| 76 |
+
"environment/pull_bucket.py",
|
| 77 |
+
"tests/grader.py",
|
| 78 |
+
"tests/test.sh",
|
| 79 |
+
):
|
| 80 |
+
dst = target / rel
|
| 81 |
+
dst.parent.mkdir(parents=True, exist_ok=True)
|
| 82 |
+
shutil.copyfile(folder / rel, dst)
|
| 83 |
+
spec = tomllib.loads((target / "task.toml").read_text())
|
| 84 |
+
spec["environment"]["memory_mb"] = 4096
|
| 85 |
+
spec["environment"]["cpus"] = 1
|
| 86 |
+
# Cluster user IDs may not exist inside Daytona's user namespace.
|
| 87 |
+
spec["environment"].setdefault("env", {})["TAR_OPTIONS"] = "--no-same-owner"
|
| 88 |
+
(target / "task.toml").write_text(tomli_w.dumps(spec))
|
| 89 |
+
hashes = {
|
| 90 |
+
str(f.relative_to(destination / "datasets" / split)): hashlib.sha256(
|
| 91 |
+
f.read_bytes()
|
| 92 |
+
).hexdigest()
|
| 93 |
+
for f in sorted(target.rglob("*"))
|
| 94 |
+
if f.is_file()
|
| 95 |
+
}
|
| 96 |
+
tasks.append({**row, "file_hashes": hashes})
|
| 97 |
+
local = (sources or {}).get(split)
|
| 98 |
+
manifest = {
|
| 99 |
+
"source_dataset": repo,
|
| 100 |
+
"source_revision": None if local else revision,
|
| 101 |
+
"expected_hub_revision": revision,
|
| 102 |
+
"local_source": str(local) if local else None,
|
| 103 |
+
"task_count": len(tasks),
|
| 104 |
+
"tasks": tasks,
|
| 105 |
+
}
|
| 106 |
+
write_json(destination / f"{split}_manifest.json", manifest)
|
| 107 |
+
manifests[split] = manifest
|
| 108 |
+
train = {r["source"] for r in manifests["train"]["tasks"]}
|
| 109 |
+
test = {r["source"] for r in manifests["test"]["tasks"]}
|
| 110 |
+
notebooks = [
|
| 111 |
+
{r.get("notebook") for r in manifests[s]["tasks"]} - {None}
|
| 112 |
+
for s in ("train", "test")
|
| 113 |
+
]
|
| 114 |
+
if train & test or notebooks[0] & notebooks[1]:
|
| 115 |
+
raise ValueError("Train/test overlap")
|
| 116 |
+
write_json(
|
| 117 |
+
destination / "ready.json",
|
| 118 |
+
{
|
| 119 |
+
"train": len(train),
|
| 120 |
+
"test": len(test),
|
| 121 |
+
"grader_sha256": GRADER_SHA256,
|
| 122 |
+
"train_test_overlap": 0,
|
| 123 |
+
},
|
| 124 |
+
)
|
| 125 |
+
return manifests
|
| 126 |
+
|
| 127 |
+
|
| 128 |
+
if __name__ == "__main__":
|
| 129 |
+
p = argparse.ArgumentParser(description=__doc__)
|
| 130 |
+
p.add_argument("--output", type=Path, default=ROOT / "prepared")
|
| 131 |
+
p.add_argument("--train-source", type=Path)
|
| 132 |
+
p.add_argument("--test-source", type=Path)
|
| 133 |
+
a = p.parse_args()
|
| 134 |
+
result = prepare(
|
| 135 |
+
a.output,
|
| 136 |
+
{s: v for s, v in (("train", a.train_source), ("test", a.test_source)) if v},
|
| 137 |
+
)
|
| 138 |
+
print(json.dumps({s: m["task_count"] for s, m in result.items()}))
|
pyproject.toml
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[build-system]
|
| 2 |
+
requires = ["setuptools>=68"]
|
| 3 |
+
build-backend = "setuptools.build_meta"
|
| 4 |
+
|
| 5 |
+
[project]
|
| 6 |
+
name = "smoldataenv-opencode"
|
| 7 |
+
version = "0.1.0"
|
| 8 |
+
requires-python = ">=3.12"
|
| 9 |
+
|
| 10 |
+
[tool.setuptools.packages.find]
|
| 11 |
+
include = ["smoldataenv_opencode*"]
|
requirements.txt
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# OpenEnv main is installed by install.sh. No trainer or GPU packages are needed.
|
| 2 |
+
harbor[daytona]>=0.22.0
|
| 3 |
+
daytona>=0.203.0
|
| 4 |
+
fastmcp>=2
|
| 5 |
+
uvicorn[standard]
|
| 6 |
+
gradio
|
| 7 |
+
huggingface-hub
|
| 8 |
+
math-verify
|
| 9 |
+
tomli-w
|
smoldataenv_opencode.egg-info/SOURCES.txt
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
README.md
|
| 2 |
+
pyproject.toml
|
| 3 |
+
smoldataenv_opencode/__init__.py
|
| 4 |
+
smoldataenv_opencode/catalog.py
|
| 5 |
+
smoldataenv_opencode/client.py
|
| 6 |
+
smoldataenv_opencode/daytona.py
|
| 7 |
+
smoldataenv_opencode/environment.py
|
| 8 |
+
smoldataenv_opencode/server.py
|
| 9 |
+
smoldataenv_opencode/tasks.py
|
| 10 |
+
smoldataenv_opencode.egg-info/PKG-INFO
|
| 11 |
+
smoldataenv_opencode.egg-info/SOURCES.txt
|
| 12 |
+
smoldataenv_opencode.egg-info/dependency_links.txt
|
| 13 |
+
smoldataenv_opencode.egg-info/top_level.txt
|
smoldataenv_opencode.egg-info/dependency_links.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
|
smoldataenv_opencode.egg-info/top_level.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
smoldataenv_opencode
|
smoldataenv_opencode/__init__.py
ADDED
|
File without changes
|
smoldataenv_opencode/catalog.py
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""The Task API serves names and instructions, never private verifier answers."""
|
| 2 |
+
|
| 3 |
+
import os
|
| 4 |
+
from functools import lru_cache
|
| 5 |
+
|
| 6 |
+
from .tasks import load_tasks
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
@lru_cache
|
| 10 |
+
def tasks(split):
|
| 11 |
+
if split not in {"train", "test"}:
|
| 12 |
+
raise ValueError("Choose train or test")
|
| 13 |
+
return load_tasks(os.environ.get("SMOLDATA_DATA", "prepared"), split)
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
def task_by_name(split, name):
|
| 17 |
+
return next(row for row in tasks(split) if row["name"] == name)
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
class TaskCatalog:
|
| 21 |
+
def list_splits(self):
|
| 22 |
+
return ["train", "test"]
|
| 23 |
+
|
| 24 |
+
def num_tasks(self, split):
|
| 25 |
+
return len(tasks(split))
|
| 26 |
+
|
| 27 |
+
def get_task(self, split, index):
|
| 28 |
+
return {
|
| 29 |
+
key: value for key, value in tasks(split)[index].items() if key != "folder"
|
| 30 |
+
}
|
| 31 |
+
|
| 32 |
+
def get_task_range(self, split, start=None, stop=None):
|
| 33 |
+
return [
|
| 34 |
+
self.get_task(split, i)
|
| 35 |
+
for i in range(*slice(start, stop).indices(self.num_tasks(split)))
|
| 36 |
+
]
|
| 37 |
+
|
| 38 |
+
def list_tasks(self, split):
|
| 39 |
+
return self.get_task_range(split)
|
smoldataenv_opencode/client.py
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""The public OpenEnv training session contract over a remote native OpenCode server."""
|
| 2 |
+
|
| 3 |
+
from pathlib import Path
|
| 4 |
+
|
| 5 |
+
from openenv.core.harness import (
|
| 6 |
+
ResourceSession,
|
| 7 |
+
ToolResult,
|
| 8 |
+
TrainingTrace,
|
| 9 |
+
VerifyResult,
|
| 10 |
+
)
|
| 11 |
+
from openenv.core.mcp_client import MCPToolClient
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
class RemoteSession(ResourceSession):
|
| 15 |
+
def __init__(self, server, row, model, sampling):
|
| 16 |
+
self.client = MCPToolClient(server, message_timeout_s=1800).sync()
|
| 17 |
+
self.row, self.model, self.sampling = row, model, sampling
|
| 18 |
+
self.result = None
|
| 19 |
+
|
| 20 |
+
def initial_messages(self):
|
| 21 |
+
return [{"role": "user", "content": self.row["instruction"]}]
|
| 22 |
+
|
| 23 |
+
def list_tools(self):
|
| 24 |
+
return []
|
| 25 |
+
|
| 26 |
+
def call_tool(self, name, arguments):
|
| 27 |
+
return ToolResult(error="OpenCode owns its tool loop")
|
| 28 |
+
|
| 29 |
+
def wait_for_completion(self, timeout_s=None):
|
| 30 |
+
self.client.reset()
|
| 31 |
+
folder = Path(self.row["folder"])
|
| 32 |
+
self.result = self.client.call_tool(
|
| 33 |
+
"run_rollout",
|
| 34 |
+
split=folder.parent.parent.name,
|
| 35 |
+
task_name=folder.name,
|
| 36 |
+
model=self.model,
|
| 37 |
+
sampling=self.sampling,
|
| 38 |
+
)
|
| 39 |
+
return 0
|
| 40 |
+
|
| 41 |
+
def fetch_training_trace(self):
|
| 42 |
+
if self.result is None:
|
| 43 |
+
raise RuntimeError("Rollout has not completed")
|
| 44 |
+
if "capture_error" in self.result:
|
| 45 |
+
raise ValueError(self.result["capture_error"])
|
| 46 |
+
return TrainingTrace.model_validate(self.result["training_trace"])
|
| 47 |
+
|
| 48 |
+
def verify(self, transcript, final_state=None):
|
| 49 |
+
return VerifyResult(
|
| 50 |
+
env_reward=self.result["correctness"] if self.result else None, done=True
|
| 51 |
+
)
|
| 52 |
+
|
| 53 |
+
def close(self):
|
| 54 |
+
self.client.close()
|
| 55 |
+
|
| 56 |
+
|
| 57 |
+
class RemoteTaskFactory:
|
| 58 |
+
def __init__(self, args, tasks, *, sampling):
|
| 59 |
+
self.args, self.sampling = args, sampling
|
| 60 |
+
self.tasks = {row["instruction"]: row for row in tasks}
|
| 61 |
+
|
| 62 |
+
def create(self, task, seed=None, episode_id=None):
|
| 63 |
+
return RemoteSession(
|
| 64 |
+
self.args.server,
|
| 65 |
+
self.tasks[task[-1]["content"]],
|
| 66 |
+
self.args.model,
|
| 67 |
+
self.sampling,
|
| 68 |
+
)
|
smoldataenv_opencode/daytona.py
ADDED
|
@@ -0,0 +1,144 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Daytona implementation of the standalone OpenCode sandbox protocol."""
|
| 2 |
+
|
| 3 |
+
from __future__ import annotations
|
| 4 |
+
|
| 5 |
+
import math
|
| 6 |
+
import os
|
| 7 |
+
import shlex
|
| 8 |
+
import time
|
| 9 |
+
import uuid
|
| 10 |
+
from functools import lru_cache
|
| 11 |
+
|
| 12 |
+
from opencode_env.sandbox.base import ExecResult
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
@lru_cache(maxsize=1)
|
| 16 |
+
def client():
|
| 17 |
+
from daytona import Daytona
|
| 18 |
+
|
| 19 |
+
return Daytona()
|
| 20 |
+
|
| 21 |
+
|
| 22 |
+
class DaytonaBgJob:
|
| 23 |
+
def __init__(self, handle, directory, pid):
|
| 24 |
+
self.handle, self.directory, self._pid = handle, directory, pid
|
| 25 |
+
|
| 26 |
+
@property
|
| 27 |
+
def pid(self):
|
| 28 |
+
return self._pid
|
| 29 |
+
|
| 30 |
+
def wait(self, timeout=None):
|
| 31 |
+
deadline = time.monotonic() + timeout if timeout is not None else float("inf")
|
| 32 |
+
while time.monotonic() < deadline:
|
| 33 |
+
if self.handle.exists(self.directory + "/exit"):
|
| 34 |
+
return int(self.handle.read_text(self.directory + "/exit").strip())
|
| 35 |
+
time.sleep(min(0.5, max(0, deadline - time.monotonic())))
|
| 36 |
+
raise TimeoutError("Background command exceeded its deadline")
|
| 37 |
+
|
| 38 |
+
def kill(self):
|
| 39 |
+
self.handle.exec(f"kill -TERM -- -{self.pid} 2>/dev/null || true", timeout=10)
|
| 40 |
+
|
| 41 |
+
|
| 42 |
+
class DaytonaSandboxHandle:
|
| 43 |
+
def __init__(self, sandbox):
|
| 44 |
+
self._sandbox = sandbox
|
| 45 |
+
self._deleted = False
|
| 46 |
+
|
| 47 |
+
@property
|
| 48 |
+
def sandbox_id(self):
|
| 49 |
+
return self._sandbox.id
|
| 50 |
+
|
| 51 |
+
def exec(self, cmd, *, envs=None, cwd=None, timeout=60):
|
| 52 |
+
# The SDK's exec is not a shell. Quote the complete script once and let bash
|
| 53 |
+
# interpret it; neither user text nor environment values are interpolated.
|
| 54 |
+
result = self._sandbox.process.exec(
|
| 55 |
+
"bash -lc " + shlex.quote(cmd),
|
| 56 |
+
cwd=cwd,
|
| 57 |
+
env=envs,
|
| 58 |
+
timeout=max(1, math.ceil(timeout)) if timeout is not None else None,
|
| 59 |
+
)
|
| 60 |
+
code = result.exit_code
|
| 61 |
+
return ExecResult(124 if code is None else int(code), result.result or "", "")
|
| 62 |
+
|
| 63 |
+
def write_text(self, path, content):
|
| 64 |
+
parent = path.rsplit("/", 1)[0] or "."
|
| 65 |
+
result = self.exec("mkdir -p " + shlex.quote(parent))
|
| 66 |
+
if result.exit_code:
|
| 67 |
+
raise RuntimeError("Could not create sandbox directory")
|
| 68 |
+
self._sandbox.fs.upload_file(content.encode(), path)
|
| 69 |
+
|
| 70 |
+
def read_text(self, path):
|
| 71 |
+
return self._sandbox.fs.download_file(path).decode()
|
| 72 |
+
|
| 73 |
+
def exists(self, path):
|
| 74 |
+
return self.exec("test -e " + shlex.quote(path), timeout=15).exit_code == 0
|
| 75 |
+
|
| 76 |
+
def start_bg(self, cmd, *, envs=None, cwd=None):
|
| 77 |
+
directory = "/tmp/openenv-process-" + uuid.uuid4().hex
|
| 78 |
+
self.write_text(
|
| 79 |
+
directory + "/run.sh",
|
| 80 |
+
"#!/bin/bash\n(\n"
|
| 81 |
+
+ cmd
|
| 82 |
+
+ "\n)"
|
| 83 |
+
+ "\ncode=$?\nprintf '%s' \"$code\" > "
|
| 84 |
+
+ shlex.quote(directory + "/exit")
|
| 85 |
+
+ "\n",
|
| 86 |
+
)
|
| 87 |
+
result = self.exec(
|
| 88 |
+
"setsid bash "
|
| 89 |
+
+ shlex.quote(directory + "/run.sh")
|
| 90 |
+
+ " > "
|
| 91 |
+
+ shlex.quote(directory + "/output")
|
| 92 |
+
+ " 2>&1 < /dev/null & echo $!",
|
| 93 |
+
envs=envs,
|
| 94 |
+
cwd=cwd,
|
| 95 |
+
timeout=15,
|
| 96 |
+
)
|
| 97 |
+
if result.exit_code:
|
| 98 |
+
raise RuntimeError("Could not launch background command")
|
| 99 |
+
return DaytonaBgJob(
|
| 100 |
+
self, directory, int(result.stdout.strip().splitlines()[-1])
|
| 101 |
+
)
|
| 102 |
+
|
| 103 |
+
def kill(self):
|
| 104 |
+
if not self._deleted:
|
| 105 |
+
client().delete(self._sandbox, timeout=60, wait=True)
|
| 106 |
+
self._deleted = True
|
| 107 |
+
|
| 108 |
+
|
| 109 |
+
class DaytonaSandboxBackend:
|
| 110 |
+
def __init__(self, *, image, snapshot=None):
|
| 111 |
+
self.image, self.snapshot = (
|
| 112 |
+
image,
|
| 113 |
+
snapshot or os.environ.get("DATA_AGENT_DAYTONA_SNAPSHOT"),
|
| 114 |
+
)
|
| 115 |
+
|
| 116 |
+
def create(self, *, timeout_s=900, envs=None, metadata=None):
|
| 117 |
+
from daytona import (
|
| 118 |
+
CreateSandboxFromImageParams,
|
| 119 |
+
CreateSandboxFromSnapshotParams,
|
| 120 |
+
Resources,
|
| 121 |
+
)
|
| 122 |
+
|
| 123 |
+
options = {
|
| 124 |
+
"language": "python",
|
| 125 |
+
"os_user": "root",
|
| 126 |
+
"env_vars": envs,
|
| 127 |
+
"labels": {
|
| 128 |
+
**(metadata or {}),
|
| 129 |
+
"openenv_component": "blackbox-opencode",
|
| 130 |
+
"openenv_owner": os.environ.get("RUN_OWNER", "local"),
|
| 131 |
+
},
|
| 132 |
+
"public": False,
|
| 133 |
+
"auto_stop_interval": max(30, math.ceil(timeout_s / 60)),
|
| 134 |
+
"auto_delete_interval": 0,
|
| 135 |
+
}
|
| 136 |
+
if self.snapshot:
|
| 137 |
+
params = CreateSandboxFromSnapshotParams(snapshot=self.snapshot, **options)
|
| 138 |
+
else:
|
| 139 |
+
params = CreateSandboxFromImageParams(
|
| 140 |
+
image=self.image,
|
| 141 |
+
resources=Resources(cpu=1, memory=4, disk=5),
|
| 142 |
+
**options,
|
| 143 |
+
)
|
| 144 |
+
return DaytonaSandboxHandle(client().create(params, timeout=300))
|
smoldataenv_opencode/environment.py
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Native OpenCode sessions on the fixed SmolDataEnvs tasks."""
|
| 2 |
+
|
| 3 |
+
import json
|
| 4 |
+
import os
|
| 5 |
+
|
| 6 |
+
from opencode_env.config import OpenCodeConfig
|
| 7 |
+
from opencode_env.harness import OpenCodeSessionFactory
|
| 8 |
+
from opencode_env.task import OpenCodeTask
|
| 9 |
+
from openenv.core.harness import VerifyResult
|
| 10 |
+
|
| 11 |
+
from .daytona import DaytonaSandboxBackend
|
| 12 |
+
from .tasks import grade_answer, stage_task
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
class TaskSession:
|
| 16 |
+
def __init__(self, session):
|
| 17 |
+
self.session = session
|
| 18 |
+
|
| 19 |
+
def __getattr__(self, name):
|
| 20 |
+
return getattr(self.session, name)
|
| 21 |
+
|
| 22 |
+
def fetch_training_trace(self):
|
| 23 |
+
trace = self.session.fetch_training_trace()
|
| 24 |
+
try:
|
| 25 |
+
events = [
|
| 26 |
+
json.loads(line)
|
| 27 |
+
for line in self.session.fetch_trace().splitlines()
|
| 28 |
+
if line.strip()
|
| 29 |
+
]
|
| 30 |
+
parts = [
|
| 31 |
+
event["part"] for event in events if event.get("type") == "tool_use"
|
| 32 |
+
]
|
| 33 |
+
ids = [part["callID"] for part in parts]
|
| 34 |
+
if not any(event.get("type") == "step_finish" for event in events):
|
| 35 |
+
raise ValueError("Incomplete OpenCode event stream")
|
| 36 |
+
if any(not value for value in ids) or len(set(ids)) != len(ids):
|
| 37 |
+
raise ValueError("Missing or repeated tool action IDs")
|
| 38 |
+
if any(
|
| 39 |
+
part.get("state", {}).get("status") not in {"completed", "error"}
|
| 40 |
+
for part in parts
|
| 41 |
+
):
|
| 42 |
+
raise ValueError("Unfinished tool action")
|
| 43 |
+
calls = len(ids)
|
| 44 |
+
except (OSError, ValueError, KeyError, TypeError):
|
| 45 |
+
calls = None
|
| 46 |
+
for turn in trace.turns:
|
| 47 |
+
turn.metadata["native_tool_calls"] = calls
|
| 48 |
+
return trace
|
| 49 |
+
|
| 50 |
+
|
| 51 |
+
def verify(sandbox, task):
|
| 52 |
+
return VerifyResult(
|
| 53 |
+
env_reward=grade_answer(sandbox, task.metadata["folder"]), done=True
|
| 54 |
+
)
|
| 55 |
+
|
| 56 |
+
|
| 57 |
+
class TaskFactory:
|
| 58 |
+
def __init__(self, args, tasks, *, sampling):
|
| 59 |
+
self.tasks = {task["instruction"]: task for task in tasks}
|
| 60 |
+
config = OpenCodeConfig(
|
| 61 |
+
base_url=os.environ["SANDBOX_VLLM_URL"].rstrip("/") + "/v1",
|
| 62 |
+
api_key=os.environ["SANDBOX_VLLM_KEY"],
|
| 63 |
+
model=args.model,
|
| 64 |
+
opencode_version="1.18.31",
|
| 65 |
+
sandbox_home="/root",
|
| 66 |
+
proxy_disable_thinking=True,
|
| 67 |
+
proxy_max_tokens_cap=4096,
|
| 68 |
+
agent_timeout_s=600,
|
| 69 |
+
run_format="json",
|
| 70 |
+
extra_setup_shell="mkdir -p /workdir && rmdir /root/workdir && ln -s /workdir /root/workdir",
|
| 71 |
+
disabled_tools=["webfetch", "question", "task"],
|
| 72 |
+
extra_opencode_json={"permission": {"*": "allow"}},
|
| 73 |
+
)
|
| 74 |
+
self.factory = OpenCodeSessionFactory(
|
| 75 |
+
config=config,
|
| 76 |
+
sampling=sampling,
|
| 77 |
+
verifier=verify,
|
| 78 |
+
mode="transparent_proxy",
|
| 79 |
+
sandbox_backend=DaytonaSandboxBackend(
|
| 80 |
+
image="docker.io/savatar101/env-data-agent-train:base"
|
| 81 |
+
),
|
| 82 |
+
)
|
| 83 |
+
|
| 84 |
+
def create(self, task, seed=None, episode_id=None):
|
| 85 |
+
row = self.tasks[task[-1]["content"]]
|
| 86 |
+
task = OpenCodeTask(
|
| 87 |
+
instruction=row["instruction"], metadata={"folder": row["folder"]}
|
| 88 |
+
)
|
| 89 |
+
session = self.factory.create(
|
| 90 |
+
task, seed=seed, episode_id=episode_id, start_agent=False
|
| 91 |
+
)
|
| 92 |
+
try:
|
| 93 |
+
stage_task(session.sandbox, row["folder"])
|
| 94 |
+
session.start_agent()
|
| 95 |
+
return TaskSession(session)
|
| 96 |
+
except BaseException:
|
| 97 |
+
session.close()
|
| 98 |
+
raise
|
smoldataenv_opencode/server.py
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Run native OpenCode on SmolDataEnvs through the OpenEnv protocol."""
|
| 2 |
+
|
| 3 |
+
import os
|
| 4 |
+
from types import SimpleNamespace
|
| 5 |
+
|
| 6 |
+
from fastmcp import FastMCP
|
| 7 |
+
from openenv.core.env_server import create_app
|
| 8 |
+
from openenv.core.env_server.mcp_environment import MCPEnvironment
|
| 9 |
+
from openenv.core.env_server.mcp_types import CallToolAction, CallToolObservation
|
| 10 |
+
from openenv.core.env_server.types import Observation, State
|
| 11 |
+
|
| 12 |
+
from .catalog import TaskCatalog, task_by_name
|
| 13 |
+
from .environment import TaskFactory
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
class OpenCodeEnvironment(TaskCatalog, MCPEnvironment):
|
| 17 |
+
SUPPORTS_CONCURRENT_SESSIONS = True
|
| 18 |
+
|
| 19 |
+
def __init__(self):
|
| 20 |
+
self._state = State()
|
| 21 |
+
mcp = FastMCP("smoldataenv-opencode")
|
| 22 |
+
|
| 23 |
+
@mcp.tool
|
| 24 |
+
def run_rollout(split: str, task_name: str, model: str, sampling: dict) -> dict:
|
| 25 |
+
"""Run OpenCode, grade its answer, and export its typed training trace."""
|
| 26 |
+
row = task_by_name(split, task_name)
|
| 27 |
+
factory = TaskFactory(
|
| 28 |
+
SimpleNamespace(model=model), [row], sampling=sampling
|
| 29 |
+
)
|
| 30 |
+
session = factory.create([{"role": "user", "content": row["instruction"]}])
|
| 31 |
+
try:
|
| 32 |
+
session.wait_for_completion(timeout_s=900)
|
| 33 |
+
try:
|
| 34 |
+
trace = session.fetch_training_trace()
|
| 35 |
+
except (ValueError, TypeError, KeyError) as exc:
|
| 36 |
+
return {"capture_error": str(exc)}
|
| 37 |
+
grade = session.verify([]).env_reward
|
| 38 |
+
return {
|
| 39 |
+
"training_trace": trace.model_dump(mode="json"),
|
| 40 |
+
"correctness": grade,
|
| 41 |
+
}
|
| 42 |
+
finally:
|
| 43 |
+
session.close()
|
| 44 |
+
|
| 45 |
+
super().__init__(mcp)
|
| 46 |
+
|
| 47 |
+
def reset(self, seed=None, episode_id=None, **kwargs):
|
| 48 |
+
self._state = State(episode_id=episode_id)
|
| 49 |
+
return Observation(metadata={"status": "Call run_rollout with a task name"})
|
| 50 |
+
|
| 51 |
+
@property
|
| 52 |
+
def state(self):
|
| 53 |
+
return self._state
|
| 54 |
+
|
| 55 |
+
def _step_impl(self, action, **kwargs):
|
| 56 |
+
raise ValueError("Use an MCP tool action")
|
| 57 |
+
|
| 58 |
+
def step(self, action, timeout_s=None, **kwargs):
|
| 59 |
+
return super().step(action, timeout_s=timeout_s or 1800, **kwargs)
|
| 60 |
+
|
| 61 |
+
async def step_async(self, action, timeout_s=None, **kwargs):
|
| 62 |
+
return await super().step_async(action, timeout_s=timeout_s or 1800, **kwargs)
|
| 63 |
+
|
| 64 |
+
|
| 65 |
+
os.environ.setdefault("ENABLE_WEB_INTERFACE", "true")
|
| 66 |
+
app = create_app(
|
| 67 |
+
OpenCodeEnvironment,
|
| 68 |
+
CallToolAction,
|
| 69 |
+
CallToolObservation,
|
| 70 |
+
env_name="smoldataenv_opencode",
|
| 71 |
+
max_concurrent_envs=int(os.environ.get("MAX_CONCURRENT_ENVS", "40")),
|
| 72 |
+
)
|
smoldataenv_opencode/tasks.py
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Stage public task files in a sandbox; run the held-out grader on the host."""
|
| 2 |
+
|
| 3 |
+
import json
|
| 4 |
+
import os
|
| 5 |
+
import subprocess
|
| 6 |
+
import sys
|
| 7 |
+
from pathlib import Path
|
| 8 |
+
|
| 9 |
+
import tomllib
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
def load_tasks(data, split):
|
| 13 |
+
root = Path(data).resolve() / "datasets" / split / "tasks"
|
| 14 |
+
tasks = []
|
| 15 |
+
for folder in sorted(root.iterdir()):
|
| 16 |
+
spec = tomllib.loads((folder / "task.toml").read_text())
|
| 17 |
+
tasks.append(
|
| 18 |
+
{
|
| 19 |
+
"name": folder.name,
|
| 20 |
+
"folder": str(folder),
|
| 21 |
+
"instruction": (folder / "instruction.md").read_text(),
|
| 22 |
+
"difficulty": spec["metadata"]["difficulty_tier"],
|
| 23 |
+
}
|
| 24 |
+
)
|
| 25 |
+
if not tasks or len({t["instruction"] for t in tasks}) != len(tasks):
|
| 26 |
+
raise ValueError("Tasks must have unique instructions; run prepare.py first")
|
| 27 |
+
return tasks
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
def stage_task(sandbox, folder):
|
| 31 |
+
folder = Path(folder)
|
| 32 |
+
spec = tomllib.loads((folder / "task.toml").read_text())
|
| 33 |
+
# Only data-download credentials enter the sandbox, never verifier answers.
|
| 34 |
+
env = {
|
| 35 |
+
key: os.path.expandvars(value)
|
| 36 |
+
for key, value in spec["environment"]["env"].items()
|
| 37 |
+
}
|
| 38 |
+
if any("${" in value for value in env.values()):
|
| 39 |
+
raise ValueError("Set HF_TOKEN before staging task data")
|
| 40 |
+
sandbox.write_text(
|
| 41 |
+
"/opt/pull_bucket.py", (folder / "environment/pull_bucket.py").read_text()
|
| 42 |
+
)
|
| 43 |
+
result = sandbox.exec(
|
| 44 |
+
"mkdir -p /workdir /home/user/input && python3 /opt/pull_bucket.py "
|
| 45 |
+
'&& test -n "$(ls -A /home/user/input)"',
|
| 46 |
+
envs=env,
|
| 47 |
+
timeout=300,
|
| 48 |
+
)
|
| 49 |
+
if result.exit_code:
|
| 50 |
+
raise RuntimeError("Task data download failed")
|
| 51 |
+
|
| 52 |
+
|
| 53 |
+
def grade_answer(sandbox, folder):
|
| 54 |
+
folder = Path(folder)
|
| 55 |
+
spec = tomllib.loads((folder / "task.toml").read_text())
|
| 56 |
+
answer = (
|
| 57 |
+
sandbox.read_text("/workdir/answer.txt")
|
| 58 |
+
if sandbox.exists("/workdir/answer.txt")
|
| 59 |
+
else ""
|
| 60 |
+
)
|
| 61 |
+
result = subprocess.run(
|
| 62 |
+
[sys.executable, str(folder / "tests/grader.py"), "--json"],
|
| 63 |
+
input=answer,
|
| 64 |
+
text=True,
|
| 65 |
+
capture_output=True,
|
| 66 |
+
timeout=120,
|
| 67 |
+
check=False,
|
| 68 |
+
env={**os.environ, **spec["verifier"]["env"]},
|
| 69 |
+
)
|
| 70 |
+
if result.returncode:
|
| 71 |
+
raise RuntimeError("Task grader failed")
|
| 72 |
+
value = json.loads(result.stdout)["correctness"]
|
| 73 |
+
if value not in (0, 1):
|
| 74 |
+
raise ValueError("Expected a binary correctness grade")
|
| 75 |
+
return float(value)
|
start.sh
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
set -euo pipefail
|
| 3 |
+
cd "$(dirname "$0")"
|
| 4 |
+
python prepare.py --output "${SMOLDATA_DATA:-prepared}"
|
| 5 |
+
exec uvicorn smoldataenv_opencode.server:app --host 0.0.0.0 --port "${PORT:-7860}" --ws-ping-timeout 1800
|