UserWarning: Field "model_max_budget" has conflict with protected namespace "model_".
Its not clear whether this installation error is fatal or can be ignored. This is after running ./setup.sh once...
Installing the current project: skyvern (0.1.0) Installing postgresql using brew /tmp:5432 - no response PostgreSQL is already running in a Docker container. Database user exists. Database exists. Installing playwright dependencies... Running Alembic upgrade... Alembic mode: online INFO [alembic.runtime.migration] Context impl PostgresqlImpl. INFO [alembic.runtime.migration] Will assume transactional DDL. Creating organization and API token... /Users/steve/Library/Caches/pypoetry/virtualenvs/skyvern-HWQwphh0-py3.11/lib/python3.11/site-packages/pydantic/_internal/fields.py:151: UserWarning: Field "model_max_budget" has conflict with protected namespace "model".
You may be able to resolve this warning by setting model_config['protected_namespaces'] = ().
warnings.warn(
Existing secrets.toml file backed up as secrets.backup.toml
.streamlit/secrets.toml file updated with organization details.
error uploading: HTTPSConnectionPool(host='us-api.i.posthog.com', port=443): Max retries exceeded with url: /batch/ (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x10f7b6a50>: Failed to establish a new connection: [Errno 61] Connection refused'))
Setup completed successfully.
I still seem to be able to run the scheduler after this.
Yep -- this is just a warning, and it's unfortunately an issue with LiteLLM's naming choices
Let me know if you find a good fix for it -- We'd love a contribution here
The warning you're encountering is due to a conflict between your model's field names and Pydantic's protected namespaces. Pydantic uses the model_ prefix for its own methods and attributes to avoid collisions with user-defined fields. When you define a field that starts with model_, Pydantic issues a warning to prevent potential conflicts.
To resolve this warning, you can modify the protected_namespaces attribute in your model's configuration. By default, Pydantic protects the model_ namespace, but you can customize this behavior by setting protected_namespaces to an empty tuple or a tuple of your own choosing. This tells Pydantic not to treat the specified prefixes as protected namespaces, thus eliminating the warning for fields that start with those prefixes.
Here's how you can adjust your model to suppress the warning:
from pydantic import BaseModel, ConfigDict
class YourModel(BaseModel):
model_max_budget: int # Assuming this is your field causing the warning
class Config:
model_config = ConfigDict(protected_namespaces=())
In this example, setting protected_namespaces=() in the Config class of your model tells Pydantic not to treat any prefixes as protected, effectively suppressing the warning for fields starting with model_.
Remember, while this approach suppresses the warning, it's important to ensure that your field names do not unintentionally override or conflict with Pydantic's methods or attributes. If you're using a version of Pydantic that supports this feature (Pydantic V2 or later), you can find more details in the protected_namespace documentation
Bumped up litellm version to solve this issue. Closing the issue