Download code/tt_diffusion_planner/ttaw/server/__init__.py from changh95/diffusion-planner-p150: direct link, hf CLI and curl.
- Browser
- Download file 1 kB
-
https://huggingface.co/changh95/diffusion-planner-p150/resolve/main/code/tt_diffusion_planner/ttaw/server/__init__.py
- Command line
-
hf download hf://changh95/diffusion-planner-p150/code/tt_diffusion_planner/ttaw/server/__init__.py
-
curl -L -o __init__.py https://huggingface.co/changh95/diffusion-planner-p150/resolve/main/code/tt_diffusion_planner/ttaw/server/__init__.py
1 kB
| # SPDX-License-Identifier: Apache-2.0 | |
| """C08 HTTP serving shared by every bundle. | |
| - ``server.app``: :func:`create_app` builds the FastAPI (ASGI) app of a bundle from a :class:`ServerSpec` | |
| (routes ``/``, ``/health``, ``/v1/health``, ``/info``, ``/v1/models``, ``/predict``; lifespan = weights -> device -> | |
| graph -> trace capture; errors 400 / 422 / 503 / 500). Imports fastapi / pydantic. | |
| - ``server.client``: standard-library-only request builder, HTTP helpers and smoke checks (``/info`` must report | |
| the pinned dispatch and grid). | |
| - ``server.smoke``: standard-library-only agreement of a served body with a stored CPU-reference body (every output | |
| family, numpy-free npz / png decoding) and the serve-profile pins of a staged tt-model manifest. | |
| Neither imports anything from ttaw, so a bundle's ``smoke_test.py`` can load them by path and run under any | |
| Python 3.9+ outside the container. This ``__init__`` imports nothing, so ``import <pkg>.ttaw.server.client`` never | |
| pulls in fastapi. | |
| """ | |