test: refactor tests and fix inference edge cases
- Convert protocol and MoE test classes to plain functions - Add real server/engine integration and generate_async tests - Isolate test model per test and use pytest tmp_path - Reset FastAPI engine state after inference tests - Fix generate_async StopIteration handling on Python 3.12 - Fix HF adapter MoE dense/shared and Gemma qk_norm mapping - Correct dev dependency httpx2 to httpx
This commit is contained in:
@@ -156,9 +156,8 @@ class InferenceEngine:
|
||||
async def _agen():
|
||||
loop = asyncio.get_event_loop()
|
||||
while True:
|
||||
try:
|
||||
token = await loop.run_in_executor(None, next, sync_gen)
|
||||
except StopIteration:
|
||||
token = await loop.run_in_executor(None, next, sync_gen, None)
|
||||
if token is None:
|
||||
break
|
||||
yield token
|
||||
|
||||
|
||||
Reference in New Issue
Block a user