Skip to content

Commit

Permalink
fix test format
Browse files Browse the repository at this point in the history
  • Loading branch information
shane-huang committed Apr 24, 2024
1 parent 59cfeb6 commit 8fc5850
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
not model_ids_to_test,
reason="TEST_BIGDLLLM_MODEL_IDS environment variable not set.",
)
model_ids_to_test = [model_id.strip() for model_id in model_ids_to_test.split(",")]
model_ids_to_test = [model_id.strip() for model_id in model_ids_to_test.split(",")] # type: ignore


@skip_if_no_model_ids
Expand Down
7 changes: 4 additions & 3 deletions libs/community/tests/integration_tests/llms/test_ipex_llm.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""Test IPEX LLM"""
import os
from typing import Any

import pytest
from langchain_core.outputs import LLMResult
Expand All @@ -10,18 +11,18 @@
skip_if_no_model_ids = pytest.mark.skipif(
not model_ids_to_test, reason="TEST_IPEXLLM_MODEL_IDS environment variable not set."
)
model_ids_to_test = [model_id.strip() for model_id in model_ids_to_test.split(",")]
model_ids_to_test = [model_id.strip() for model_id in model_ids_to_test.split(",")] # type: ignore


def load_model(model_id: str) -> None:
def load_model(model_id: str) -> Any:
llm = IpexLLM.from_model_id(
model_id=model_id,
model_kwargs={"temperature": 0, "max_length": 16, "trust_remote_code": True},
)
return llm


def load_model_more_types(model_id: str, load_in_low_bit: str) -> None:
def load_model_more_types(model_id: str, load_in_low_bit: str) -> Any:
llm = IpexLLM.from_model_id(
model_id=model_id,
load_in_low_bit=load_in_low_bit,
Expand Down

0 comments on commit 8fc5850

Please sign in to comment.