Skip to content

Force install pydantic module below v2.0.0 #264

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

Merged
merged 1 commit into from
Aug 1, 2023

Conversation

tedhtchang
Copy link
Member

@tedhtchang tedhtchang commented Aug 1, 2023

Issue link

#223

What changes have been made

Add pydantic<2 into the pyproject.toml file

Verification steps

First Download the branch with the PR

git clone --single-branch --branch issue-223 https://github.com/tedhtchang/codeflare-sdk.git
cd codeflare-sdk/

Build and install a new wheel for codeflare-sdk module

poetry build
pip install -U dist/codeflare_sdk-0.0.0.dev0-py3-none-any.whl

Verify pydantic version is below 2

pip list |grep pydantic 
# should be something like:
pydantic                  1.10.12
pydantic_core             2.4.0

Test the ray.init()

Run the jupyter notebook from your laptop.

# pip install jupyterlab
jupyter lab demo-notebooks/interactive/local_interactive.ipynb

Make sure ray.init(address=cluster.local_client_url(), logging_level="DEBUG") does not fail with AttributeError: module 'pydantic.fields' has no attribute 'ModelField' error.

Checks

  • [ x] I've made sure the tests are passing.
  • Testing Strategy
    • Unit tests
    • [x ] Manual tests
    • Testing is not required for this change

@tedhtchang
Copy link
Member Author

cc @Maxusmusti

Copy link
Collaborator

@Maxusmusti Maxusmusti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May want to add a space between < and 2, and then make sure that it still works, just to match poetry documentation

see https://python-poetry.org/docs/dependency-specification/

@tedhtchang
Copy link
Member Author

tedhtchang commented Aug 1, 2023

@Maxusmusti Thanks. This was helpful. I re-tested the change and made sure it still works.

Copy link
Collaborator

@Maxusmusti Maxusmusti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Maxusmusti Maxusmusti merged commit cf0f990 into project-codeflare:main Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants