raduvespa commited on
Commit
53f5e50
·
1 Parent(s): ac6a6e0

suppress http logging; back to 100K docs

Browse files
Files changed (3) hide show
  1. README.md +3 -3
  2. app.py +6 -0
  3. entrypoint.sh +1 -1
README.md CHANGED
@@ -6,12 +6,12 @@ colorFrom: blue
6
  colorTo: green
7
  sdk: docker
8
  app_port: 7860
9
- startup_duration_timeout: 45m
10
  ---
11
 
12
  HNSWTuner is an interactive demo for tuning Vespa HNSW nearest-neighbor search parameters on the public
13
  SIFT-128 benchmark.
14
 
15
  The Space starts a local Vespa instance and the FastAPI app in one container. On a cold start the Space
16
- needs substantial time to boot Vespa, download the SIFT dataset (~500 MB), and feed the full 1M vectors
17
- before the UI becomes ready. A loading page is served immediately while bootstrap runs in the background.
 
6
  colorTo: green
7
  sdk: docker
8
  app_port: 7860
9
+ startup_duration_timeout: 15m
10
  ---
11
 
12
  HNSWTuner is an interactive demo for tuning Vespa HNSW nearest-neighbor search parameters on the public
13
  SIFT-128 benchmark.
14
 
15
  The Space starts a local Vespa instance and the FastAPI app in one container. On a cold start the Space
16
+ usually needs a few minutes to boot Vespa, download the dataset, and feed 100K vectors before the full
17
+ UI becomes ready. A loading page is served immediately while bootstrap runs in the background.
app.py CHANGED
@@ -30,6 +30,11 @@ STARTING_MESSAGE = "HNSWTuner is starting up..."
30
  READY_MESSAGE = "HNSWTuner is ready."
31
 
32
 
 
 
 
 
 
33
  @dataclass(frozen=True)
34
  class BootstrapSnapshot:
35
  """Read-only view of bootstrap state for request handlers."""
@@ -191,6 +196,7 @@ def create_app(
191
 
192
  @asynccontextmanager
193
  async def lifespan(fastapi_app: FastAPI):
 
194
  try:
195
  cfg = config_factory()
196
  except Exception as exc:
 
30
  READY_MESSAGE = "HNSWTuner is ready."
31
 
32
 
33
+ def _configure_third_party_logging() -> None:
34
+ """Suppress noisy per-request INFO logs from third-party HTTP clients."""
35
+ logging.getLogger("httpx").setLevel(logging.WARNING)
36
+
37
+
38
  @dataclass(frozen=True)
39
  class BootstrapSnapshot:
40
  """Read-only view of bootstrap state for request handlers."""
 
196
 
197
  @asynccontextmanager
198
  async def lifespan(fastapi_app: FastAPI):
199
+ _configure_third_party_logging()
200
  try:
201
  cfg = config_factory()
202
  except Exception as exc:
entrypoint.sh CHANGED
@@ -48,7 +48,7 @@ export VESPA_URL=http://localhost
48
  export VESPA_PORT=8080
49
  export PORT=7860
50
  export DATA_DIR="${DATA_DIR:-/data}"
51
- export DATASET_SIZE="${DATASET_SIZE:-full}"
52
 
53
  /opt/venv/bin/python app.py &
54
  APP_PID=$!
 
48
  export VESPA_PORT=8080
49
  export PORT=7860
50
  export DATA_DIR="${DATA_DIR:-/data}"
51
+ export DATASET_SIZE="${DATASET_SIZE:-mid}"
52
 
53
  /opt/venv/bin/python app.py &
54
  APP_PID=$!