Skip to content

Commit

Permalink
fix: healthchecks failing due to missing internal id (#115)
Browse files Browse the repository at this point in the history
Co-authored-by: Avram Tudor <[email protected]>
  • Loading branch information
quitrk and Avram Tudor authored Oct 30, 2024
1 parent 1620fc8 commit da61775
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ else
export LLAMA_N_CTX=8182
fi

poetry run python -m uvicorn skynet.main:app --reload
poetry run python -m skynet.main
4 changes: 2 additions & 2 deletions skynet/http_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ def _get_session():
return _session


async def get(url, type='json'):
async def get(url, type='json', **kwargs):
session = _get_session()
async with session.get(url) as response:
async with session.get(url, **kwargs) as response:
if type == 'json':
return await response.json()

Expand Down
8 changes: 6 additions & 2 deletions skynet/modules/ttt/openai_api/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from fastapi import FastAPI

from skynet import http_client
from skynet.env import app_port, llama_n_ctx, llama_path, openai_api_base_url, use_vllm
from skynet.env import app_port, app_uuid, llama_n_ctx, llama_path, openai_api_base_url, use_vllm
from skynet.logs import get_logger
from skynet.utils import dependencies, responses

Expand Down Expand Up @@ -51,7 +51,11 @@ async def is_ready():
url = f'{openai_api_base_url}/health' if use_vllm else openai_api_base_url

try:
response = await http_client.get(url, 'text')
response = await http_client.get(
url,
'text',
headers={'X-Skynet-UUID': app_uuid},
)

if use_vllm:
return response == ''
Expand Down

0 comments on commit da61775

Please sign in to comment.