From 817514604b6103ab409afa85c4403093227fa0a2 Mon Sep 17 00:00:00 2001 From: Pavel Tisnovsky Date: Wed, 2 Oct 2024 14:53:42 +0200 Subject: [PATCH] Fixed docstyle --- ols/src/llms/providers/azure_openai.py | 2 +- ols/src/llms/providers/bam.py | 2 +- ols/src/llms/providers/fake_provider.py | 2 +- ols/src/llms/providers/openai.py | 2 +- ols/src/llms/providers/rhelai_vllm.py | 2 +- ols/src/llms/providers/rhoai_vllm.py | 2 +- ols/src/llms/providers/watsonx.py | 2 +- scripts/evaluation/utils/models.py | 6 +++--- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ols/src/llms/providers/azure_openai.py b/ols/src/llms/providers/azure_openai.py index 83c21e91..467f0ae6 100644 --- a/ols/src/llms/providers/azure_openai.py +++ b/ols/src/llms/providers/azure_openai.py @@ -45,7 +45,7 @@ class AzureOpenAI(LLMProvider): @property def default_params(self) -> dict[str, Any]: - """Default LLM params.""" + """Construct and return structure with default LLM params.""" self.url = str(self.provider_config.url or self.url) self.credentials = self.provider_config.credentials deployment_name = self.provider_config.deployment_name diff --git a/ols/src/llms/providers/bam.py b/ols/src/llms/providers/bam.py index 1ea4323d..2643d69b 100644 --- a/ols/src/llms/providers/bam.py +++ b/ols/src/llms/providers/bam.py @@ -24,7 +24,7 @@ class BAM(LLMProvider): @property def default_params(self) -> dict[str, Any]: - """Default LLM params.""" + """Construct and return structure with default LLM params.""" return { "decoding_method": "sample", "max_new_tokens": 512, diff --git a/ols/src/llms/providers/fake_provider.py b/ols/src/llms/providers/fake_provider.py index 78af8469..242c62bc 100644 --- a/ols/src/llms/providers/fake_provider.py +++ b/ols/src/llms/providers/fake_provider.py @@ -19,7 +19,7 @@ class FakeProvider(LLMProvider): @property def default_params(self) -> dict[str, Any]: - """Default LLM params.""" + """Construct and return structure with default LLM params.""" return {} def load(self) -> LLM: diff --git a/ols/src/llms/providers/openai.py b/ols/src/llms/providers/openai.py index e945e721..127ad6db 100644 --- a/ols/src/llms/providers/openai.py +++ b/ols/src/llms/providers/openai.py @@ -22,7 +22,7 @@ class OpenAI(LLMProvider): @property def default_params(self) -> dict[str, Any]: - """Default LLM params.""" + """Construct and return structure with default LLM params.""" self.url = str(self.provider_config.url or self.url) self.credentials = self.provider_config.credentials # provider-specific configuration has precendence over regular configuration diff --git a/ols/src/llms/providers/rhelai_vllm.py b/ols/src/llms/providers/rhelai_vllm.py index c2c216e7..a04590df 100644 --- a/ols/src/llms/providers/rhelai_vllm.py +++ b/ols/src/llms/providers/rhelai_vllm.py @@ -24,7 +24,7 @@ class RHELAIVLLM(LLMProvider): @property def default_params(self) -> dict[str, Any]: - """Default LLM params.""" + """Construct and return structure with default LLM params.""" self.url = str(self.provider_config.url or self.url) self.credentials = self.provider_config.credentials # provider-specific configuration has precendence over regular configuration diff --git a/ols/src/llms/providers/rhoai_vllm.py b/ols/src/llms/providers/rhoai_vllm.py index 5ebe0cfe..976e1c88 100644 --- a/ols/src/llms/providers/rhoai_vllm.py +++ b/ols/src/llms/providers/rhoai_vllm.py @@ -24,7 +24,7 @@ class RHOAIVLLM(LLMProvider): @property def default_params(self) -> dict[str, Any]: - """Default LLM params.""" + """Construct and return structure with default LLM params.""" self.url = str(self.provider_config.url or self.url) self.credentials = self.provider_config.credentials # provider-specific configuration has precendence over regular configuration diff --git a/ols/src/llms/providers/watsonx.py b/ols/src/llms/providers/watsonx.py index e501c48f..32b36917 100644 --- a/ols/src/llms/providers/watsonx.py +++ b/ols/src/llms/providers/watsonx.py @@ -26,7 +26,7 @@ class Watsonx(LLMProvider): @property def default_params(self) -> dict[str, Any]: - """Default LLM params.""" + """Construct and return structure with default LLM params.""" # https://www.ibm.com/docs/en/watsonx-as-a-service?topic=models-parameters return { GenParams.DECODING_METHOD: "sample", diff --git a/scripts/evaluation/utils/models.py b/scripts/evaluation/utils/models.py index a35b2509..d356ff2b 100644 --- a/scripts/evaluation/utils/models.py +++ b/scripts/evaluation/utils/models.py @@ -12,7 +12,7 @@ class OpenAIVanilla(OpenAI): @property def default_params(self): - """Default LLM params.""" + """Construct and return structure with default LLM params.""" self.url = str(self.provider_config.url) self.credentials = self.provider_config.credentials # provider-specific configuration has precendence over regular configuration @@ -34,7 +34,7 @@ class AzureOpenAIVanilla(AzureOpenAI): @property def default_params(self): - """Default LLM params.""" + """Construct and return structure with default LLM params.""" self.url = str(self.provider_config.url or self.url) self.credentials = self.provider_config.credentials deployment_name = self.provider_config.deployment_name @@ -71,7 +71,7 @@ class WatsonxVanilla(Watsonx): @property def default_params(self): - """Default LLM params.""" + """Construct and return structure with default LLM params.""" return { GenTextParamsMetaNames.MAX_NEW_TOKENS: 1024, }