Skip to content

Commit

Permalink
Merge pull request #174 from tisnik/sync-with-ols
Browse files Browse the repository at this point in the history
Sync with OLS downstream
  • Loading branch information
tisnik authored Dec 3, 2024
2 parents c9c1b06 + 7e36327 commit e784f8b
Show file tree
Hide file tree
Showing 14 changed files with 22 additions and 29 deletions.
6 changes: 2 additions & 4 deletions ols/src/llms/providers/azure_openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,8 @@ def default_params(self) -> dict[str, Any]:
"api_version": api_version,
"deployment_name": deployment_name,
"model": self.model,
"model_kwargs": {
"top_p": 0.95,
"frequency_penalty": 1.03,
},
"top_p": 0.95,
"frequency_penalty": 1.03,
"organization": None,
"cache": None,
"streaming": True,
Expand Down
6 changes: 2 additions & 4 deletions ols/src/llms/providers/openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,8 @@ def default_params(self) -> dict[str, Any]:
"base_url": self.url,
"openai_api_key": self.credentials,
"model": self.model,
"model_kwargs": {
"top_p": 0.95,
"frequency_penalty": 1.03,
},
"top_p": 0.95,
"frequency_penalty": 1.03,
"organization": None,
"cache": None,
"streaming": True,
Expand Down
6 changes: 2 additions & 4 deletions ols/src/llms/providers/rhelai_vllm.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,8 @@ def default_params(self) -> dict[str, Any]:
"base_url": self.url,
"openai_api_key": self.credentials,
"model": self.model,
"model_kwargs": {
"top_p": 0.95,
"frequency_penalty": 1.03,
},
"top_p": 0.95,
"frequency_penalty": 1.03,
"organization": None,
"cache": None,
"streaming": True,
Expand Down
6 changes: 2 additions & 4 deletions ols/src/llms/providers/rhoai_vllm.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,8 @@ def default_params(self) -> dict[str, Any]:
"base_url": self.url,
"openai_api_key": self.credentials,
"model": self.model,
"model_kwargs": {
"top_p": 0.95,
"frequency_penalty": 1.03,
},
"top_p": 0.95,
"frequency_penalty": 1.03,
"organization": None,
"cache": None,
"streaming": True,
Expand Down
10 changes: 5 additions & 5 deletions pdm.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ dependencies = [
"findpython==0.6.2",
"filelock==3.16.1",
"ffmpy==0.4.0",
"virtualenv==20.28.0",
]
requires-python = "==3.11.*"
readme = "README.md"
Expand Down
2 changes: 1 addition & 1 deletion tests/benchmarks/test_redactor.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from ols.utils.redactor import Redactor, RegexFilter


@pytest.fixture()
@pytest.fixture
def config():
"""Load configuration used for benchmarks."""
config = AppConfig()
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/app/endpoints/test_feedback.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from ols.app.models.config import UserDataCollection


@pytest.fixture()
@pytest.fixture
def feedback_location(tmpdir):
"""Fixture sets feedback location to tmpdir and return the path."""
full_path = (tmpdir / "feedback").strpath
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/extra_certs/test_extra_certs.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
extra_cert_path = "tests/unit/extra_certs/sample_cert_2.crt"


@pytest.fixture()
@pytest.fixture
def fake_certifi_store(tmpdir):
"""Create a fake certifi store."""
cert_store_path = tmpdir / "cacerts.crt"
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/llms/providers/test_azure_openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ def get_token(self, url):
raise Exception("Error getting token")


@pytest.fixture()
@pytest.fixture
def mocked_token_cache():
"""Fake token cache."""

Expand Down
2 changes: 1 addition & 1 deletion tests/unit/llms/providers/test_fake_provider.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Unit tests for BAM provider."""

import pytest
from langchain.llms.fake import FakeListLLM
from langchain_community.llms import FakeListLLM

from ols.app.models.config import ProviderConfig
from ols.src.llms.providers.fake_provider import FakeProvider
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/llms/providers/test_rhelai_vllm.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
cert_in_certificates_store_path = "tests/unit/extra_certs/sample_cert_1.crt"


@pytest.fixture()
@pytest.fixture
def fake_certifi_store(tmpdir):
"""Create a fake certifi store."""
cert_store_path = os.path.join(
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/llms/providers/test_rhoai_vllm.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
cert_in_certificates_store_path = "tests/unit/extra_certs/sample_cert_1.crt"


@pytest.fixture()
@pytest.fixture
def fake_certifi_store(tmpdir):
"""Create a fake certifi store."""
cert_store_path = os.path.join(
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/query_helpers/test_attachment_appender.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def yaml_without_name():
"""


@pytest.fixture()
@pytest.fixture
def broken_yaml():
"""Broken YAML file for testing."""
return """
Expand Down

0 comments on commit e784f8b

Please sign in to comment.