forked from phoenix-oss/llama-stack-mirror
Fix precommit check after moving to ruff (#927)
Lint check in main branch is failing. This fixes the lint check after we moved to ruff in https://github.com/meta-llama/llama-stack/pull/921. We need to move to a `ruff.toml` file as well as fixing and ignoring some additional checks. Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
This commit is contained in:
parent
4773092dd1
commit
34ab7a3b6c
217 changed files with 981 additions and 2681 deletions
|
@ -47,9 +47,7 @@ def inference_remote() -> ProviderFixture:
|
|||
|
||||
@pytest.fixture(scope="session")
|
||||
def inference_meta_reference(inference_model) -> ProviderFixture:
|
||||
inference_model = (
|
||||
[inference_model] if isinstance(inference_model, str) else inference_model
|
||||
)
|
||||
inference_model = [inference_model] if isinstance(inference_model, str) else inference_model
|
||||
# If embedding dimension is set, use the 8B model for testing
|
||||
if os.getenv("EMBEDDING_DIMENSION"):
|
||||
inference_model = ["meta-llama/Llama-3.1-8B-Instruct"]
|
||||
|
@ -88,9 +86,7 @@ def inference_cerebras() -> ProviderFixture:
|
|||
|
||||
@pytest.fixture(scope="session")
|
||||
def inference_ollama(inference_model) -> ProviderFixture:
|
||||
inference_model = (
|
||||
[inference_model] if isinstance(inference_model, str) else inference_model
|
||||
)
|
||||
inference_model = [inference_model] if isinstance(inference_model, str) else inference_model
|
||||
if inference_model and "Llama3.1-8B-Instruct" in inference_model:
|
||||
pytest.skip("Ollama only supports Llama3.2-3B-Instruct for testing")
|
||||
|
||||
|
@ -99,9 +95,7 @@ def inference_ollama(inference_model) -> ProviderFixture:
|
|||
Provider(
|
||||
provider_id="ollama",
|
||||
provider_type="remote::ollama",
|
||||
config=OllamaImplConfig(
|
||||
host="localhost", port=os.getenv("OLLAMA_PORT", 11434)
|
||||
).model_dump(),
|
||||
config=OllamaImplConfig(host="localhost", port=os.getenv("OLLAMA_PORT", 11434)).model_dump(),
|
||||
)
|
||||
],
|
||||
)
|
||||
|
@ -109,9 +103,7 @@ def inference_ollama(inference_model) -> ProviderFixture:
|
|||
|
||||
@pytest_asyncio.fixture(scope="session")
|
||||
def inference_vllm(inference_model) -> ProviderFixture:
|
||||
inference_model = (
|
||||
[inference_model] if isinstance(inference_model, str) else inference_model
|
||||
)
|
||||
inference_model = [inference_model] if isinstance(inference_model, str) else inference_model
|
||||
return ProviderFixture(
|
||||
providers=[
|
||||
Provider(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue