Spaces:
Sleeping
Sleeping
AdityaProCoder commited on
Commit ·
b4c19b3
1
Parent(s): f9b1f86
inefrence easy,medium, hard updated
Browse files- inference.py +4 -2
inference.py
CHANGED
|
@@ -18,7 +18,7 @@ HF_TOKEN = os.getenv("HF_TOKEN")
|
|
| 18 |
if not HF_TOKEN:
|
| 19 |
raise ValueError("HF_TOKEN environment variable is required")
|
| 20 |
|
| 21 |
-
|
| 22 |
BENCHMARK = os.getenv("BENCHMARK", "revlogixenv_v0")
|
| 23 |
|
| 24 |
# Backwards-compatible label retained by older evaluators (if they hardcode it).
|
|
@@ -205,7 +205,9 @@ def run_episode(client: OpenAI, task_name: str) -> tuple[bool, int, float, list[
|
|
| 205 |
|
| 206 |
def main() -> None:
|
| 207 |
client = OpenAI(base_url=API_BASE_URL, api_key=HF_TOKEN)
|
| 208 |
-
|
|
|
|
|
|
|
| 209 |
|
| 210 |
|
| 211 |
if __name__ == "__main__":
|
|
|
|
| 18 |
if not HF_TOKEN:
|
| 19 |
raise ValueError("HF_TOKEN environment variable is required")
|
| 20 |
|
| 21 |
+
TASKS = os.getenv("TASKS", "easy,medium,hard")
|
| 22 |
BENCHMARK = os.getenv("BENCHMARK", "revlogixenv_v0")
|
| 23 |
|
| 24 |
# Backwards-compatible label retained by older evaluators (if they hardcode it).
|
|
|
|
| 205 |
|
| 206 |
def main() -> None:
|
| 207 |
client = OpenAI(base_url=API_BASE_URL, api_key=HF_TOKEN)
|
| 208 |
+
task_names = [t.strip() for t in TASKS.split(",") if t.strip()]
|
| 209 |
+
for task_name in task_names:
|
| 210 |
+
run_episode(client, task_name)
|
| 211 |
|
| 212 |
|
| 213 |
if __name__ == "__main__":
|