Download test_loacal.py from arya89/openops: direct link, hf CLI and curl.
- Browser
- Download file 615 Bytes
-
https://huggingface.co/spaces/arya89/openops/resolve/main/test_loacal.py
- Command line
-
hf download hf://spaces/arya89/openops/test_loacal.py
-
curl -L -o test_loacal.py https://huggingface.co/spaces/arya89/openops/resolve/main/test_loacal.py
615 Bytes
| """Quick local test - runs in <5 seconds""" | |
| from server.my_env_environment import MyEnvEnvironment | |
| from models import IncidentAction | |
| from graders import get_grader | |
| print("Testing OpenOps environment...") | |
| for task_id in [1, 2, 3]: | |
| env = MyEnvEnvironment() | |
| env.reset(task_id=task_id) | |
| # Take a few actions | |
| env.step(IncidentAction(action_id=0, task_id=task_id)) | |
| env.step(IncidentAction(action_id=1, task_id=task_id)) | |
| grader = get_grader(task_id) | |
| score = grader(env) | |
| print(f"Task {task_id}: Environment working ✅ (test score: {score:.2f})") | |
| print("\n✅ All tests passed!") |