You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to run either of the entrypoint scripts, the following line in the mii/entrypoints/data_models.py file causes an import error:
from mii.pydantic_v1 import BaseModel, BaseSettings, Field
Restoring the file fixes the issue, but I guess that's not a solution. Another option is to:
Install pydantic-settings and change that line to:
from pydantic import BaseModel, Field, ConfigDict
from pydantic_settings import BaseSettings
Since pydantic now has the model_ namespace protected, about 10 classes need to have model_config = ConfigDict(protected_namespaces=()) (or similar) added to them, namely the ChatCompletion*, TokenCheckRequestItem, Embeddings*,Completion*, and AppSettings.
AppSettings.model_id needs to marked as Optional[str] since it is not passed on initialization (see here and here)
I only tested with the openai_api_server.py script.
The text was updated successfully, but these errors were encountered:
When trying to run either of the entrypoint scripts, the following line in the mii/entrypoints/data_models.py file causes an import error:
Restoring the file fixes the issue, but I guess that's not a solution. Another option is to:
pydantic-settings
and change that line to:model_
namespace protected, about 10 classes need to havemodel_config = ConfigDict(protected_namespaces=())
(or similar) added to them, namely theChatCompletion*
,TokenCheckRequestItem
,Embeddings*
,Completion*
, andAppSettings
.AppSettings.model_id
needs to marked asOptional[str]
since it is not passed on initialization (see here and here)I only tested with the
openai_api_server.py
script.The text was updated successfully, but these errors were encountered: