Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: dstack doesn't work with the new version of pydantic #550

Closed
coderoflagos opened this issue Jul 8, 2023 · 1 comment · Fixed by #544
Closed

[Bug]: dstack doesn't work with the new version of pydantic #550

coderoflagos opened this issue Jul 8, 2023 · 1 comment · Fixed by #544
Assignees
Labels
bug Something isn't working

Comments

@coderoflagos
Copy link

coderoflagos commented Jul 8, 2023

dstack version

0.10.3

Python version

Python 3.11.4

Host OS

MacOS 13.1

Host Arch

x86

What happened?

I tried installing dstack on my MacOS (v 13.1), currently using the Python version - 3.11.4 and still doesn't work, I ran the pip3 install "dstack[aws,gcp,azure,lambda]" command, seemed great not until I ran the dstack start command, then it started giving me these errors:

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.11/bin/dstack", line 5, in <module>
    from dstack._internal.cli.main import main
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/dstack/_internal/cli/main.py", line 6, in <module>
    from dstack._internal.cli.common import check_cli_errors
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/dstack/_internal/cli/common.py", line 13, in <module>
    from dstack.api.hub.errors import HubClientError
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/dstack/api/hub/__init__.py", line 1, in <module>
    from dstack.api.hub._client import HubClient
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/dstack/api/hub/_client.py", line 23, in <module>
    from dstack._internal.hub.models import ProjectInfo
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/dstack/_internal/hub/models/__init__.py", line 71, in <module>
    class AWSProjectCreds(BaseModel):
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pydantic/_internal/_model_construction.py", line 95, in __new__
    private_attributes = inspect_namespace(
                         ^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pydantic/_internal/_model_construction.py", line 279, in inspect_namespace
    raise TypeError("To define root models, use `pydantic.RootModel` rather than a field called '__root__'")
TypeError: To define root models, use `pydantic.RootModel` rather than a field called '__root__'

Relevant log output

Ran the pip list dstack start command and got this:

piplist.txt

Additional Information

None.

@coderoflagos coderoflagos added the bug Something isn't working label Jul 8, 2023
@peterschmidt85 peterschmidt85 changed the title [Bug]: Error during Installation. [Bug]: dstack doesn't work with the new version of pydantic Jul 8, 2023
@peterschmidt85
Copy link
Contributor

A workaround until we fix this is to use an older version of pydantic:

pip install pydantic==1.10.10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants