Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions xinference/core/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -1396,8 +1396,9 @@ async def update_model_type(self, model_type: str):
)

try:
# Download JSON from remote API
response = requests.get(url, timeout=30)
# Download JSON from remote API. Run the blocking request in a
# worker thread so it does not freeze the actor's event loop.
response = await asyncio.to_thread(requests.get, url, timeout=30)
response.raise_for_status()

# Parse JSON response
Expand Down