Skip to content

[Core]: YamlModel is a deprecated class in pydantic_yaml #136

Open
@realTaki

Description

@realTaki

System Info

commit 6a4d55a

Reproduction

When running python main.py in local env, the settings.py raises an error because YamlModel is a deprecated class in pydantic_yaml.

Traceback (most recent call last):
  File "/data/wangshichuan/workspace/embedbase-qdrant/main.py", line 3, in <module>
    from embedbase import get_app
  File "/data/wangshichuan/workspace/embedbase-qdrant/embedbase/__init__.py", line 2, in <module>
    from embedbase.api import get_app
  File "/data/wangshichuan/workspace/embedbase-qdrant/embedbase/api.py", line 3, in <module>
    from embedbase.app import Embedbase
  File "/data/wangshichuan/workspace/embedbase-qdrant/embedbase/app.py", line 20, in <module>
    from embedbase.logging_utils import get_logger
  File "/data/wangshichuan/workspace/embedbase-qdrant/embedbase/logging_utils.py", line 4, in <module>
    from embedbase.settings import Settings
  File "/data/wangshichuan/workspace/embedbase-qdrant/embedbase/settings.py", line 5, in <module>
    from pydantic_yaml import YamlModel
ImportError: cannot import name 'YamlModel' from 'pydantic_yaml' (/home/wangshichuan/miniconda/envs/embedbase/lib/python3.10/site-packages/pydantic_yaml/__init__.py)

the code in settings.py:

4   ...
5   from pydantic_yaml import YamlModel
6   ...
```raises

### Expected behavior

should parse the file well by using pydantic_yaml.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions