Skip to content

Commit

Permalink
fix: bump client tests for api changes
Browse files Browse the repository at this point in the history
  • Loading branch information
drbh committed Feb 17, 2025
1 parent c95fe4f commit 3927ef6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 17 deletions.
15 changes: 5 additions & 10 deletions clients/python/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@


@pytest.fixture
def flan_t5_xxl():
return "google/flan-t5-xxl"
def llama_7b():
return "meta-llama/Llama-2-7b-chat-hf"


@pytest.fixture
def llama_7b():
return "meta-llama/Llama-2-7b-chat-hf"
def llama_70b():
return "meta-llama/Llama-3.1-70B-Instruct"


@pytest.fixture
Expand All @@ -21,7 +21,7 @@ def fake_model():

@pytest.fixture
def unsupported_model():
return "gpt2"
return "black-forest-labs/FLUX.1-dev"


@pytest.fixture
Expand All @@ -34,11 +34,6 @@ def bloom_url(base_url, bloom_model):
return f"{base_url}/{bloom_model}"


@pytest.fixture
def flan_t5_xxl_url(base_url, flan_t5_xxl):
return f"{base_url}/{flan_t5_xxl}"


@pytest.fixture
def llama_7b_url(base_url, llama_7b):
return f"{base_url}/{llama_7b}"
Expand Down
12 changes: 6 additions & 6 deletions clients/python/tests/test_inference_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
from text_generation.inference_api import check_model_support, deployed_models


def test_check_model_support(flan_t5_xxl, unsupported_model, fake_model):
assert check_model_support(flan_t5_xxl)
def test_check_model_support(llama_70b, unsupported_model, fake_model):
assert check_model_support(llama_70b)
assert not check_model_support(unsupported_model)

with pytest.raises(NotFoundError):
Expand All @@ -22,8 +22,8 @@ def test_deployed_models():
deployed_models()


def test_client(flan_t5_xxl):
client = InferenceAPIClient(flan_t5_xxl)
def test_client(llama_70b):
client = InferenceAPIClient(llama_70b)
assert isinstance(client, Client)


Expand All @@ -32,8 +32,8 @@ def test_client_unsupported_model(unsupported_model):
InferenceAPIClient(unsupported_model)


def test_async_client(flan_t5_xxl):
client = InferenceAPIAsyncClient(flan_t5_xxl)
def test_async_client(llama_70b):
client = InferenceAPIAsyncClient(llama_70b)
assert isinstance(client, AsyncClient)


Expand Down
2 changes: 1 addition & 1 deletion clients/python/text_generation/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,4 +464,4 @@ class DeployedModel(BaseModel):
# https://github.com/pydantic/pydantic/issues/9177
model_config = ConfigDict(protected_namespaces=())
model_id: str
sha: str
task: str

0 comments on commit 3927ef6

Please sign in to comment.