-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.py
More file actions
26 lines (22 loc) · 817 Bytes
/
main.py
File metadata and controls
26 lines (22 loc) · 817 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
"""
main.py — Quick smoke test. Runs all 3 tasks with a hold-only agent.
Use baseline.py for the full Groq-backed evaluation.
"""
from InventOps import SupplyChainEnv
from InventOps.models import Action
def main():
print("InventOps — Smoke Test (hold-only agent)\n")
for task_id in ["easy", "medium", "hard"]:
env = SupplyChainEnv(task_id=task_id, seed=42)
obs = env.reset()
done = False
total_reward = 0.0
while not done:
action = Action(action_type="hold")
obs, reward, done, info = env.step(action)
total_reward += reward
score = env.grade()
print(f" {task_id:<8} score={score:.4f} total_reward={total_reward:.1f}")
print("\nAll tasks completed successfully.")
if __name__ == "__main__":
main()