Spaces:
Running
Running
Coding Ninja commited on
Commit ·
32f4c09
1
Parent(s): ca7bdbd
fix inference stdout and README docker port
Browse files- inference.py: replace stray print() with emit_log(END) so all stdout
lines are structured [START]/[STEP]/[END] — fixes failing inference unit test
- inference.py: fix docstring ENV_URL default 8000 -> 7860
- README.md: fix docker run example -p 8000:7860 -> -p 7860:7860 so
default ENV_URL (localhost:7860) hits the container without extra config
- README.md +9 -3
- inference.py +2 -2
README.md
CHANGED
|
@@ -349,13 +349,19 @@ Build:
|
|
| 349 |
docker build -f server/Dockerfile -t helpdesk-ticket-routing .
|
| 350 |
```
|
| 351 |
|
| 352 |
-
Run locally
|
| 353 |
|
| 354 |
```bash
|
| 355 |
-
docker run -p
|
| 356 |
```
|
| 357 |
|
| 358 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 359 |
|
| 360 |
If local Docker is blocked by machine setup, the repo also includes a GitHub Actions smoke test at `.github/workflows/docker-smoke-test.yml`. That workflow builds the image on a GitHub-hosted runner, starts the container, checks `/health` and `/tasks`, and runs heuristic `inference.py` against the container.
|
| 361 |
|
|
|
|
| 349 |
docker build -f server/Dockerfile -t helpdesk-ticket-routing .
|
| 350 |
```
|
| 351 |
|
| 352 |
+
Run locally:
|
| 353 |
|
| 354 |
```bash
|
| 355 |
+
docker run -p 7860:7860 helpdesk-ticket-routing
|
| 356 |
```
|
| 357 |
|
| 358 |
+
Then run inference against it (default `ENV_URL` points to `http://localhost:7860`):
|
| 359 |
+
|
| 360 |
+
```bash
|
| 361 |
+
python inference.py
|
| 362 |
+
```
|
| 363 |
+
|
| 364 |
+
If you publish the container on a different host port, set `ENV_URL` accordingly before running `inference.py`.
|
| 365 |
|
| 366 |
If local Docker is blocked by machine setup, the repo also includes a GitHub Actions smoke test at `.github/workflows/docker-smoke-test.yml`. That workflow builds the image on a GitHub-hosted runner, starts the container, checks `/health` and `/tasks`, and runs heuristic `inference.py` against the container.
|
| 367 |
|
inference.py
CHANGED
|
@@ -6,7 +6,7 @@ Environment variables
|
|
| 6 |
---------------------
|
| 7 |
ENV_URL
|
| 8 |
Base URL of the running OpenEnv server.
|
| 9 |
-
Default: ``http://localhost:
|
| 10 |
|
| 11 |
API_BASE_URL
|
| 12 |
LLM provider base URL (OpenAI-compatible endpoint).
|
|
@@ -404,7 +404,7 @@ def run() -> None:
|
|
| 404 |
if task_id in all_results
|
| 405 |
]
|
| 406 |
overall_avg = round(sum(overall) / len(overall), 4) if overall else 0.0
|
| 407 |
-
|
| 408 |
|
| 409 |
|
| 410 |
if __name__ == "__main__":
|
|
|
|
| 6 |
---------------------
|
| 7 |
ENV_URL
|
| 8 |
Base URL of the running OpenEnv server.
|
| 9 |
+
Default: ``http://localhost:7860``
|
| 10 |
|
| 11 |
API_BASE_URL
|
| 12 |
LLM provider base URL (OpenAI-compatible endpoint).
|
|
|
|
| 404 |
if task_id in all_results
|
| 405 |
]
|
| 406 |
overall_avg = round(sum(overall) / len(overall), 4) if overall else 0.0
|
| 407 |
+
emit_log("END", overall_avg=overall_avg, tasks_completed=len(overall))
|
| 408 |
|
| 409 |
|
| 410 |
if __name__ == "__main__":
|