From e4a9549a3cdb1fc84d21063a21bf3f89fd2fec48 Mon Sep 17 00:00:00 2001 From: SumanthRH Date: Sat, 22 Mar 2025 01:06:18 +0000 Subject: [PATCH 1/2] x Signed-off-by: SumanthRH --- skythought/evals/models/base.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/skythought/evals/models/base.py b/skythought/evals/models/base.py index c9ac007e..eb56871c 100644 --- a/skythought/evals/models/base.py +++ b/skythought/evals/models/base.py @@ -3,7 +3,8 @@ from typing import Optional, Union import yaml -from pydantic import BaseModel, Field, PrivateAttr, model_validator +from pydantic import BaseModel, Field, PrivateAttr, model_validator, ConfigDict + MODEL_CONFIG_FILE_PATH = Path(__file__).parent / "model_configs.yaml" # cache the configs in a global var @@ -35,6 +36,8 @@ def read_yaml(path: str): class ModelConfig(BaseModel): + model_config = ConfigDict(protected_namespaces=()) + model_id: str name: Optional[str] = Field(default=None) # can be a string or a path to a file with the string From 64a897a90806af55535025032927142b7baea9ad Mon Sep 17 00:00:00 2001 From: SumanthRH Date: Sat, 22 Mar 2025 01:07:39 +0000 Subject: [PATCH 2/2] lint Signed-off-by: SumanthRH --- skythought/evals/models/base.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/skythought/evals/models/base.py b/skythought/evals/models/base.py index eb56871c..3f85cf58 100644 --- a/skythought/evals/models/base.py +++ b/skythought/evals/models/base.py @@ -3,8 +3,7 @@ from typing import Optional, Union import yaml -from pydantic import BaseModel, Field, PrivateAttr, model_validator, ConfigDict - +from pydantic import BaseModel, ConfigDict, Field, PrivateAttr, model_validator MODEL_CONFIG_FILE_PATH = Path(__file__).parent / "model_configs.yaml" # cache the configs in a global var @@ -36,7 +35,7 @@ def read_yaml(path: str): class ModelConfig(BaseModel): - model_config = ConfigDict(protected_namespaces=()) + model_config = ConfigDict(protected_namespaces=()) model_id: str name: Optional[str] = Field(default=None)