Skip to content

Commit

Permalink
predict concur logging
Browse files Browse the repository at this point in the history
  • Loading branch information
bdubayah committed Nov 22, 2024
1 parent 3a560a5 commit 1dee8f4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "truss"
version = "0.9.53"
version = "0.9.53rc1"
description = "A seamless bridge from model development to model delivery"
license = "MIT"
readme = "README.md"
Expand Down
5 changes: 4 additions & 1 deletion truss/templates/control/control/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@ def create_app(base_config: Dict):
app_logger=app_logger,
)

limits = httpx.Limits(max_keepalive_connections=8, max_connections=32)
# max_connections = 1000
max_connections = 32
print(f"MAX CONNECTIONS: {max_connections}")
limits = httpx.Limits(max_keepalive_connections=8, max_connections=max_connections)
app_state.proxy_client = httpx.AsyncClient(
base_url=f"http://localhost:{app_state.inference_server_port}", limits=limits
)
Expand Down
10 changes: 2 additions & 8 deletions truss/templates/server/model_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,7 @@
from multiprocessing import Lock
from pathlib import Path
from threading import Thread
from typing import (
Any,
Callable,
Dict,
Optional,
Tuple,
Union,
)
from typing import Any, Callable, Dict, Optional, Tuple, Union

import opentelemetry.sdk.trace as sdk_trace
import starlette.requests
Expand Down Expand Up @@ -655,6 +648,7 @@ async def __call__(
preprocess_result = await self.preprocess(inputs, request)

span_predict = self._tracer.start_span("call-predict")
print(f"PREDICT SEMAPHORE: {self._predict_semaphore.value}")
async with deferred_semaphore_and_span(
self._predict_semaphore, span_predict
) as get_defer_fn:
Expand Down

0 comments on commit 1dee8f4

Please sign in to comment.