Spaces:
Sleeping
Sleeping
Commit ·
04c2414
1
Parent(s): 49a72d3
fix(hf-space): flatten requirements.txt — Spaces build only mounts this file
Browse filesHF pip step copies requirements.txt to /tmp alone; -r requirements-core.txt
was missing from the image context and broke pip install (exit 1).
Made-with: Cursor
- README.md +2 -2
- requirements-core.txt +1 -1
- requirements.txt +21 -3
README.md
CHANGED
|
@@ -46,7 +46,7 @@ suggested_hardware: t4-small
|
|
| 46 |
### Hugging Face Space (GPU — T4 recommended)
|
| 47 |
|
| 48 |
- This repo’s **Space README** sets **`suggested_hardware: t4-small`** (see [Spaces config](https://huggingface.co/docs/hub/spaces-config-reference)). **Enable a T4 (or better) GPU** in the Space **Settings → Hardware** so **`custom_hf`** can load PyTorch and Hub weights on-device.
|
| 49 |
-
- **`requirements.txt`**
|
| 50 |
- **CPU-only duplicates:** switch hardware to **CPU** in Space Settings and use Gradio provider **`offline`** or API-only keys via **`auto`** (`NIM` / `OpenRouter`); **`custom_hf`** without a GPU is not supported in this layout.
|
| 51 |
- **Repository secrets:** names must match environment variables exactly (see table below). After adding or changing secrets, **restart the Space** (or trigger a rebuild) so the container picks them up.
|
| 52 |
- Full training stack: install **[`requirements-train.txt`](requirements-train.txt)** on **Colab** or locally (see Quickstart).
|
|
@@ -89,7 +89,7 @@ curl -sS -X POST "https://sanjay7676-team404-forge.hf.space/step" \
|
|
| 89 |
|
| 90 |
| # | Requirement | FORGE-v4 |
|
| 91 |
| :--: | :-- | :-- |
|
| 92 |
-
| 1 | **OpenEnv (latest):** build on the framework | **`openenv-core>=0.2.3`** in [`requirements
|
| 93 |
| 2 | **Training:** Unsloth or TRL (or other RL stack) + **Colab** | [`train_unsloth.py`](train_unsloth.py) (Unsloth + TRL), [`train_colab.py`](train_colab.py), [`FORGE_Training_Colab.ipynb`](FORGE_Training_Colab.ipynb), Colab links in the table above. |
|
| 94 |
| 3 | **Evidence of training:** loss + reward plots (real run) | Committed: [`outputs/reward_curve.png`](outputs/reward_curve.png), [`outputs/loss_curve.png`](outputs/loss_curve.png), [`outputs/pass_rate.png`](outputs/pass_rate.png), [`outputs/final_report.json`](outputs/final_report.json). |
|
| 95 |
| 4 | **Writeup / video:** mini-blog on HF *or* <2 min YouTube *etc.* | **[BLOG.md](BLOG.md)** plus **[Space Discussions](https://huggingface.co/spaces/sanjay7676/Team404_FORGE/discussions)** for an on-Hub writeup; add **public YouTube or slide URL** in the judge table when published. |
|
|
|
|
| 46 |
### Hugging Face Space (GPU — T4 recommended)
|
| 47 |
|
| 48 |
- This repo’s **Space README** sets **`suggested_hardware: t4-small`** (see [Spaces config](https://huggingface.co/docs/hub/spaces-config-reference)). **Enable a T4 (or better) GPU** in the Space **Settings → Hardware** so **`custom_hf`** can load PyTorch and Hub weights on-device.
|
| 49 |
+
- **`requirements.txt`** is one **flat** file (OpenEnv + Gradio + **PyTorch / `transformers` / PEFT / TRL**) so the Space builder can `pip install -r requirements.txt` without extra includes — required because HF only mounts this file into the build. **`requirements-core.txt`** is the **slim** set used by **`Dockerfile`** only.
|
| 50 |
- **CPU-only duplicates:** switch hardware to **CPU** in Space Settings and use Gradio provider **`offline`** or API-only keys via **`auto`** (`NIM` / `OpenRouter`); **`custom_hf`** without a GPU is not supported in this layout.
|
| 51 |
- **Repository secrets:** names must match environment variables exactly (see table below). After adding or changing secrets, **restart the Space** (or trigger a rebuild) so the container picks them up.
|
| 52 |
- Full training stack: install **[`requirements-train.txt`](requirements-train.txt)** on **Colab** or locally (see Quickstart).
|
|
|
|
| 89 |
|
| 90 |
| # | Requirement | FORGE-v4 |
|
| 91 |
| :--: | :-- | :-- |
|
| 92 |
+
| 1 | **OpenEnv (latest):** build on the framework | **`openenv-core>=0.2.3`** in [`requirements.txt`](requirements.txt) (Space) and [`requirements-core.txt`](requirements-core.txt) (slim Docker). Training overlap in [`requirements-train.txt`](requirements-train.txt). Wrapper: [`env_openenv.py`](env_openenv.py). Core: [`env.py`](env.py). |
|
| 93 |
| 2 | **Training:** Unsloth or TRL (or other RL stack) + **Colab** | [`train_unsloth.py`](train_unsloth.py) (Unsloth + TRL), [`train_colab.py`](train_colab.py), [`FORGE_Training_Colab.ipynb`](FORGE_Training_Colab.ipynb), Colab links in the table above. |
|
| 94 |
| 3 | **Evidence of training:** loss + reward plots (real run) | Committed: [`outputs/reward_curve.png`](outputs/reward_curve.png), [`outputs/loss_curve.png`](outputs/loss_curve.png), [`outputs/pass_rate.png`](outputs/pass_rate.png), [`outputs/final_report.json`](outputs/final_report.json). |
|
| 95 |
| 4 | **Writeup / video:** mini-blog on HF *or* <2 min YouTube *etc.* | **[BLOG.md](BLOG.md)** plus **[Space Discussions](https://huggingface.co/spaces/sanjay7676/Team404_FORGE/discussions)** for an on-Hub writeup; add **public YouTube or slide URL** in the judge table when published. |
|
requirements-core.txt
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
# FORGE-v4 — slim stack (Docker Hub image, CPU-only local runs, CI).
|
| 2 |
-
# Hugging Face Spaces use
|
| 3 |
|
| 4 |
# OpenEnv (official framework — Meta / HF ecosystem)
|
| 5 |
# Needs websockets>=15.1; use Gradio >=5.18 (see README Space sdk_version).
|
|
|
|
| 1 |
# FORGE-v4 — slim stack (Docker Hub image, CPU-only local runs, CI).
|
| 2 |
+
# Hugging Face Spaces: use flat requirements.txt in repo root (Spaces only mount that one file).
|
| 3 |
|
| 4 |
# OpenEnv (official framework — Meta / HF ecosystem)
|
| 5 |
# Needs websockets>=15.1; use Gradio >=5.18 (see README Space sdk_version).
|
requirements.txt
CHANGED
|
@@ -1,7 +1,25 @@
|
|
| 1 |
-
# FORGE-v4 —
|
| 2 |
-
#
|
| 3 |
|
| 4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
|
| 6 |
# Local Hugging Face inference (custom_hf on GPU Spaces)
|
| 7 |
torch>=2.3.0
|
|
|
|
| 1 |
+
# FORGE-v4 — single-file install for Hugging Face Spaces (build mounts ONLY this file).
|
| 2 |
+
# Docker slim image uses requirements-core.txt instead (see Dockerfile).
|
| 3 |
|
| 4 |
+
# OpenEnv (official framework — Meta / HF ecosystem)
|
| 5 |
+
openenv-core>=0.2.3
|
| 6 |
+
|
| 7 |
+
# Core
|
| 8 |
+
tqdm>=4.66.0
|
| 9 |
+
numpy>=1.26.0
|
| 10 |
+
pandas>=2.2.0
|
| 11 |
+
matplotlib>=3.8.0
|
| 12 |
+
PyYAML>=6.0.1
|
| 13 |
+
requests>=2.32.0
|
| 14 |
+
python-dotenv>=1.0.1
|
| 15 |
+
|
| 16 |
+
# Gradio — keep sdk_version in README YAML in sync
|
| 17 |
+
gradio>=5.18.0,<6
|
| 18 |
+
|
| 19 |
+
# API
|
| 20 |
+
fastapi>=0.115.2,<1.0
|
| 21 |
+
uvicorn>=0.30.0
|
| 22 |
+
pydantic>=2.7.0
|
| 23 |
|
| 24 |
# Local Hugging Face inference (custom_hf on GPU Spaces)
|
| 25 |
torch>=2.3.0
|