Spaces:
Running
Running
Commit ·
a4bc605
1
Parent(s): 18750f8
feat: update HF space URL, add judge demo scripts and project documentation
Browse files- HF_BLOG_POST.md +3 -3
- README.md +5 -5
- main.go +1 -1
- scratch/fix_url.py +25 -0
- scripts/demo_run.py +1 -1
- scripts/demo_run.sh +1 -1
- scripts/gridmind_grpo_colab.ipynb +2 -2
HF_BLOG_POST.md
CHANGED
|
@@ -75,7 +75,7 @@ Or run the Colab notebook: [gridmind_grpo_colab.ipynb](https://colab.research.go
|
|
| 75 |
|
| 76 |
```bash
|
| 77 |
# Quick health check
|
| 78 |
-
curl https://
|
| 79 |
|
| 80 |
# Run a heuristic baseline
|
| 81 |
python inference.py --fast-mode --task 3 --episodes 5
|
|
@@ -84,8 +84,8 @@ python inference.py --fast-mode --task 3 --episodes 5
|
|
| 84 |
python inference.py --task 3 --episodes 5
|
| 85 |
```
|
| 86 |
|
| 87 |
-
Live environment: [https://
|
| 88 |
-
Dashboard: [https://
|
| 89 |
|
| 90 |
Code: [github.com/LO-Kyu/gridmind](https://github.com/LO-Kyu/gridmind)
|
| 91 |
|
|
|
|
| 75 |
|
| 76 |
```bash
|
| 77 |
# Quick health check
|
| 78 |
+
curl https://prajwal782007-gridmind.hf.space/health
|
| 79 |
|
| 80 |
# Run a heuristic baseline
|
| 81 |
python inference.py --fast-mode --task 3 --episodes 5
|
|
|
|
| 84 |
python inference.py --task 3 --episodes 5
|
| 85 |
```
|
| 86 |
|
| 87 |
+
Live environment: [https://prajwal782007-gridmind.hf.space](https://prajwal782007-gridmind.hf.space)
|
| 88 |
+
Dashboard: [https://prajwal782007-gridmind.hf.space/dashboard](https://prajwal782007-gridmind.hf.space/dashboard)
|
| 89 |
|
| 90 |
Code: [github.com/LO-Kyu/gridmind](https://github.com/LO-Kyu/gridmind)
|
| 91 |
|
README.md
CHANGED
|
@@ -27,13 +27,13 @@ Most RL environments for LLMs are grid-worlds or toy games. GridMind-RL simulate
|
|
| 27 |
|
| 28 |
| | URL |
|
| 29 |
|--|-----|
|
| 30 |
-
| **Environment API** | https://
|
| 31 |
-
| **Live Dashboard** | https://
|
| 32 |
|
| 33 |
**Quick test:**
|
| 34 |
```bash
|
| 35 |
-
curl https://
|
| 36 |
-
curl https://
|
| 37 |
```
|
| 38 |
|
| 39 |
---
|
|
@@ -268,7 +268,7 @@ gridmind-rl/
|
|
| 268 |
|
| 269 |
## Links
|
| 270 |
|
| 271 |
-
- 🤗 HuggingFace Space: [GridMind-RL](https://
|
| 272 |
- 📝 Blog Post: [GridMind-RL: Training LLMs on Industrial Energy Management](https://huggingface.co/blog/gridmind-rl)
|
| 273 |
- 🎥 Demo Video: [YouTube Walkthrough](https://www.youtube.com/watch?v=dummy)
|
| 274 |
- 📊 Training Run: [gridmind_grpo_colab.ipynb](https://colab.research.google.com/)
|
|
|
|
| 27 |
|
| 28 |
| | URL |
|
| 29 |
|--|-----|
|
| 30 |
+
| **Environment API** | https://prajwal782007-gridmind.hf.space |
|
| 31 |
+
| **Live Dashboard** | https://prajwal782007-gridmind.hf.space/dashboard |
|
| 32 |
|
| 33 |
**Quick test:**
|
| 34 |
```bash
|
| 35 |
+
curl https://prajwal782007-gridmind.hf.space/health
|
| 36 |
+
curl https://prajwal782007-gridmind.hf.space/tasks
|
| 37 |
```
|
| 38 |
|
| 39 |
---
|
|
|
|
| 268 |
|
| 269 |
## Links
|
| 270 |
|
| 271 |
+
- 🤗 HuggingFace Space: [GridMind-RL](https://prajwal782007-gridmind.hf.space)
|
| 272 |
- 📝 Blog Post: [GridMind-RL: Training LLMs on Industrial Energy Management](https://huggingface.co/blog/gridmind-rl)
|
| 273 |
- 🎥 Demo Video: [YouTube Walkthrough](https://www.youtube.com/watch?v=dummy)
|
| 274 |
- 📊 Training Run: [gridmind_grpo_colab.ipynb](https://colab.research.google.com/)
|
main.go
CHANGED
|
@@ -1022,7 +1022,7 @@ func (s *Server) handleInfo(w http.ResponseWriter, r *http.Request) {
|
|
| 1022 |
"GET /state", "POST /simulate", "GET /feeder", "POST /coordinate",
|
| 1023 |
"GET /health", "GET /info",
|
| 1024 |
},
|
| 1025 |
-
"hf_space": "https://
|
| 1026 |
"github": "https://github.com/LO-Kyu/gridmind",
|
| 1027 |
}
|
| 1028 |
w.Header().Set("Content-Type", "application/json")
|
|
|
|
| 1022 |
"GET /state", "POST /simulate", "GET /feeder", "POST /coordinate",
|
| 1023 |
"GET /health", "GET /info",
|
| 1024 |
},
|
| 1025 |
+
"hf_space": "https://prajwal782007-gridmind.hf.space",
|
| 1026 |
"github": "https://github.com/LO-Kyu/gridmind",
|
| 1027 |
}
|
| 1028 |
w.Header().Set("Content-Type", "application/json")
|
scratch/fix_url.py
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import os
|
| 2 |
+
|
| 3 |
+
directory = r"c:\Projects\gridmind"
|
| 4 |
+
old_url = "prajwal782007-gridmind.hf.space"
|
| 5 |
+
new_url = "prajwal782007-gridmind.hf.space"
|
| 6 |
+
|
| 7 |
+
def replace_in_file(filepath):
|
| 8 |
+
try:
|
| 9 |
+
with open(filepath, 'r', encoding='utf-8') as f:
|
| 10 |
+
content = f.read()
|
| 11 |
+
except UnicodeDecodeError:
|
| 12 |
+
return # Skip binary or non-utf-8 files
|
| 13 |
+
|
| 14 |
+
if old_url in content:
|
| 15 |
+
new_content = content.replace(old_url, new_url)
|
| 16 |
+
with open(filepath, 'w', encoding='utf-8') as f:
|
| 17 |
+
f.write(new_content)
|
| 18 |
+
print(f"Updated {filepath}")
|
| 19 |
+
|
| 20 |
+
for root, dirs, files in os.walk(directory):
|
| 21 |
+
if '.git' in root or '.venv' in root or 'node_modules' in root:
|
| 22 |
+
continue
|
| 23 |
+
for file in files:
|
| 24 |
+
filepath = os.path.join(root, file)
|
| 25 |
+
replace_in_file(filepath)
|
scripts/demo_run.py
CHANGED
|
@@ -12,7 +12,7 @@ Shows:
|
|
| 12 |
|
| 13 |
Usage:
|
| 14 |
python scripts/demo_run.py
|
| 15 |
-
python scripts/demo_run.py --url https://
|
| 16 |
python scripts/demo_run.py --fast # heuristic only (no LLM key needed)
|
| 17 |
"""
|
| 18 |
|
|
|
|
| 12 |
|
| 13 |
Usage:
|
| 14 |
python scripts/demo_run.py
|
| 15 |
+
python scripts/demo_run.py --url https://prajwal782007-gridmind.hf.space
|
| 16 |
python scripts/demo_run.py --fast # heuristic only (no LLM key needed)
|
| 17 |
"""
|
| 18 |
|
scripts/demo_run.sh
CHANGED
|
@@ -54,5 +54,5 @@ echo " LLM fine-tuned: ${LLM_SCORE:-TBD}"
|
|
| 54 |
echo " Improvement: $(python3 -c "print(f'{(float(\"$LLM_SCORE\") - float(\"$HEURISTIC_SCORE\")) / float(\"$HEURISTIC_SCORE\") * 100:.1f}%')" 2>/dev/null || echo ' Run both agents to see delta')"
|
| 55 |
echo ""
|
| 56 |
echo " Dashboard: $ENV_URL/dashboard"
|
| 57 |
-
echo " HF Space: https://
|
| 58 |
echo "═══════════════════════════════════════════════════════"
|
|
|
|
| 54 |
echo " Improvement: $(python3 -c "print(f'{(float(\"$LLM_SCORE\") - float(\"$HEURISTIC_SCORE\")) / float(\"$HEURISTIC_SCORE\") * 100:.1f}%')" 2>/dev/null || echo ' Run both agents to see delta')"
|
| 55 |
echo ""
|
| 56 |
echo " Dashboard: $ENV_URL/dashboard"
|
| 57 |
+
echo " HF Space: https://prajwal782007-gridmind.hf.space"
|
| 58 |
echo "═══════════════════════════════════════════════════════"
|
scripts/gridmind_grpo_colab.ipynb
CHANGED
|
@@ -19,7 +19,7 @@
|
|
| 19 |
"\n",
|
| 20 |
"| | |\n",
|
| 21 |
"|---|---|\n",
|
| 22 |
-
"| **Environment** | https://
|
| 23 |
"| **Method** | GRPO (Group Relative Policy Optimization) |\n",
|
| 24 |
"| **Model** | Qwen2.5-1.5B-Instruct |\n",
|
| 25 |
"| **Training Time** | ~30-40 minutes on free Colab T4 GPU |\n",
|
|
@@ -65,7 +65,7 @@
|
|
| 65 |
"import json\n",
|
| 66 |
"import time\n",
|
| 67 |
"\n",
|
| 68 |
-
"ENV_URL = \"https://
|
| 69 |
"\n",
|
| 70 |
"# Test connectivity\n",
|
| 71 |
"print(\"Testing environment connectivity...\")\n",
|
|
|
|
| 19 |
"\n",
|
| 20 |
"| | |\n",
|
| 21 |
"|---|---|\n",
|
| 22 |
+
"| **Environment** | https://prajwal782007-gridmind.hf.space |\n",
|
| 23 |
"| **Method** | GRPO (Group Relative Policy Optimization) |\n",
|
| 24 |
"| **Model** | Qwen2.5-1.5B-Instruct |\n",
|
| 25 |
"| **Training Time** | ~30-40 minutes on free Colab T4 GPU |\n",
|
|
|
|
| 65 |
"import json\n",
|
| 66 |
"import time\n",
|
| 67 |
"\n",
|
| 68 |
+
"ENV_URL = \"https://prajwal782007-gridmind.hf.space\"\n",
|
| 69 |
"\n",
|
| 70 |
"# Test connectivity\n",
|
| 71 |
"print(\"Testing environment connectivity...\")\n",
|