Spaces:
Paused
Paused
rb125 commited on
Commit ·
3eed5db
1
Parent(s): 7ece369
add round logging, set infinite rounds for HF
Browse files- server/api.py +2 -1
server/api.py
CHANGED
|
@@ -88,6 +88,7 @@ def _run_economy(num_rounds: int, initial_balance: float):
|
|
| 88 |
while infinite or round_num < num_rounds:
|
| 89 |
runner._reactivate_suspended_agents()
|
| 90 |
round_results = runner._run_round(round_num)
|
|
|
|
| 91 |
runner._round_summaries.append(round_results)
|
| 92 |
step_events = runner.economy.step()
|
| 93 |
|
|
@@ -228,7 +229,7 @@ def start_economy(rounds: int = 20, balance: float = 0.5):
|
|
| 228 |
@app.on_event("startup")
|
| 229 |
async def on_startup():
|
| 230 |
import sys
|
| 231 |
-
rounds =
|
| 232 |
for i, arg in enumerate(sys.argv):
|
| 233 |
if arg == "--rounds" and i + 1 < len(sys.argv):
|
| 234 |
rounds = int(sys.argv[i + 1])
|
|
|
|
| 88 |
while infinite or round_num < num_rounds:
|
| 89 |
runner._reactivate_suspended_agents()
|
| 90 |
round_results = runner._run_round(round_num)
|
| 91 |
+
print(f"[CGAE] Round {round_num}: attempted={round_results['tasks_attempted']} passed={round_results['tasks_passed']} failed={round_results['tasks_failed']}", flush=True)
|
| 92 |
runner._round_summaries.append(round_results)
|
| 93 |
step_events = runner.economy.step()
|
| 94 |
|
|
|
|
| 229 |
@app.on_event("startup")
|
| 230 |
async def on_startup():
|
| 231 |
import sys
|
| 232 |
+
rounds = -1
|
| 233 |
for i, arg in enumerate(sys.argv):
|
| 234 |
if arg == "--rounds" and i + 1 < len(sys.argv):
|
| 235 |
rounds = int(sys.argv[i + 1])
|