Spaces:
Sleeping
Sleeping
Checked logs
Browse files- .gitignore +15 -14
- inference.py +2 -2
.gitignore
CHANGED
|
@@ -1,14 +1,15 @@
|
|
| 1 |
-
.env
|
| 2 |
-
# Temp validation results
|
| 3 |
-
validation_output.tmp
|
| 4 |
-
venv/
|
| 5 |
-
temp/
|
| 6 |
-
__pycache__/
|
| 7 |
-
*/__pycache__/
|
| 8 |
-
.venv/
|
| 9 |
-
.env/
|
| 10 |
-
train/models/
|
| 11 |
-
bess_visualization.png
|
| 12 |
-
*.pth
|
| 13 |
-
*.safetensors
|
| 14 |
-
*.png
|
|
|
|
|
|
| 1 |
+
.env
|
| 2 |
+
# Temp validation results
|
| 3 |
+
validation_output.tmp
|
| 4 |
+
venv/
|
| 5 |
+
temp/
|
| 6 |
+
__pycache__/
|
| 7 |
+
*/__pycache__/
|
| 8 |
+
.venv/
|
| 9 |
+
.env/
|
| 10 |
+
train/models/
|
| 11 |
+
bess_visualization.png
|
| 12 |
+
*.pth
|
| 13 |
+
*.safetensors
|
| 14 |
+
*.png
|
| 15 |
+
scratch/
|
inference.py
CHANGED
|
@@ -45,9 +45,9 @@ try:
|
|
| 45 |
except ImportError:
|
| 46 |
pass
|
| 47 |
|
| 48 |
-
API_KEY = os.getenv("HF_TOKEN") or os.getenv("API_KEY", "")
|
| 49 |
API_BASE_URL = os.getenv("API_BASE_URL", "https://router.huggingface.co/v1")
|
| 50 |
MODEL_NAME = os.getenv("MODEL_NAME", "meta-llama/Llama-3.1-8B-Instruct")
|
|
|
|
| 51 |
BENCHMARK = "bess-rl"
|
| 52 |
TASKS = ["easy", "medium", "hard"]
|
| 53 |
MAX_STEPS = 168 # 1-week simulation - well within 20-minute runtime
|
|
@@ -208,7 +208,7 @@ async def run_task(client: OpenAI, task: str) -> float:
|
|
| 208 |
# Entry point
|
| 209 |
# ---------------------------------------------------------------------------
|
| 210 |
async def main() -> None:
|
| 211 |
-
client = OpenAI(base_url=API_BASE_URL, api_key=
|
| 212 |
for task in TASKS:
|
| 213 |
await run_task(client, task)
|
| 214 |
|
|
|
|
| 45 |
except ImportError:
|
| 46 |
pass
|
| 47 |
|
|
|
|
| 48 |
API_BASE_URL = os.getenv("API_BASE_URL", "https://router.huggingface.co/v1")
|
| 49 |
MODEL_NAME = os.getenv("MODEL_NAME", "meta-llama/Llama-3.1-8B-Instruct")
|
| 50 |
+
HF_TOKEN = os.getenv("HF_TOKEN")
|
| 51 |
BENCHMARK = "bess-rl"
|
| 52 |
TASKS = ["easy", "medium", "hard"]
|
| 53 |
MAX_STEPS = 168 # 1-week simulation - well within 20-minute runtime
|
|
|
|
| 208 |
# Entry point
|
| 209 |
# ---------------------------------------------------------------------------
|
| 210 |
async def main() -> None:
|
| 211 |
+
client = OpenAI(base_url=API_BASE_URL, api_key=HF_TOKEN)
|
| 212 |
for task in TASKS:
|
| 213 |
await run_task(client, task)
|
| 214 |
|