mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-06-24 10:00:16 +00:00
fix style
This commit is contained in:
parent
0295bf243f
commit
a32025f931
@ -15,7 +15,6 @@ import pytest
|
|||||||
from aiohttp import ClientConnectorError, ClientOSError, ServerDisconnectedError
|
from aiohttp import ClientConnectorError, ClientOSError, ServerDisconnectedError
|
||||||
from docker.errors import NotFound
|
from docker.errors import NotFound
|
||||||
import logging
|
import logging
|
||||||
from gaudi.test_gaudi_generate import TEST_CONFIGS
|
|
||||||
from huggingface_hub import AsyncInferenceClient, TextGenerationOutput
|
from huggingface_hub import AsyncInferenceClient, TextGenerationOutput
|
||||||
import huggingface_hub
|
import huggingface_hub
|
||||||
|
|
||||||
@ -166,7 +165,7 @@ def gaudi_launcher():
|
|||||||
model_id: str,
|
model_id: str,
|
||||||
test_name: str,
|
test_name: str,
|
||||||
tgi_args: List[str] = None,
|
tgi_args: List[str] = None,
|
||||||
env_config: dict = None
|
env_config: dict = None,
|
||||||
):
|
):
|
||||||
logger.info(
|
logger.info(
|
||||||
f"Starting docker launcher for model {model_id} and test {test_name}"
|
f"Starting docker launcher for model {model_id} and test {test_name}"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
from typing import Any, Dict, Generator
|
from typing import Any, Dict, Generator
|
||||||
from _pytest.fixtures import SubRequest
|
from _pytest.fixtures import SubRequest
|
||||||
from huggingface_hub import AsyncInferenceClient, TextGenerationOutput
|
from huggingface_hub import AsyncInferenceClient
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
|
|
||||||
@ -237,12 +237,14 @@ def input(test_config: Dict[str, Any]) -> str:
|
|||||||
|
|
||||||
|
|
||||||
@pytest.fixture(scope="module")
|
@pytest.fixture(scope="module")
|
||||||
def tgi_service(gaudi_launcher, model_id: str, test_name: str, test_config: Dict[str, Any]):
|
def tgi_service(
|
||||||
|
gaudi_launcher, model_id: str, test_name: str, test_config: Dict[str, Any]
|
||||||
|
):
|
||||||
with gaudi_launcher(
|
with gaudi_launcher(
|
||||||
model_id,
|
model_id,
|
||||||
test_name,
|
test_name,
|
||||||
tgi_args=test_config.get("args", []),
|
tgi_args=test_config.get("args", []),
|
||||||
env_config=test_config.get("env_config", {})
|
env_config=test_config.get("env_config", {}),
|
||||||
) as tgi_service:
|
) as tgi_service:
|
||||||
yield tgi_service
|
yield tgi_service
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user