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

Pydantic v2 Migration #54

Merged
merged 7 commits into from
Feb 26, 2024
Merged

Pydantic v2 Migration #54

merged 7 commits into from
Feb 26, 2024

Conversation

movchan74
Copy link
Contributor

Summary:
This PR migrates the codebase to Pydantic >= 2.0.

Key Changes:

  • Updated Pydantic to >=2.0
  • Updated Ray to >=2.9
  • Updated vLLVM to >= 0.3.0
  • Updated Pytorch to 2.1.2
  • Updated CUDA to 12.1
  • Updated the codebase to use the new Pydantic API
  • Increased the required memory for the LLaMa 2 7b Chat from 10GB to 13GB because new version of vLLM consumes more memory. There is an open issue in vLLM about this. Note that now vLLM requires 13GB of memory to run so if gets allocated on the GPU with less than 13GB of memory, it will fail. And because Ray still does not support GPU memory aware scheduling, we cannot enforce this requirement in the code. There is an open PR in Ray with the proposal to add GPU memory aware scheduling.

Related Issues: #49, #35

@movchan74 movchan74 self-assigned this Feb 20, 2024
Copy link
Contributor

@HRashidi HRashidi left a comment

Choose a reason for hiding this comment

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

LGTM

aana/api/request_handler.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@evanderiel evanderiel left a comment

Choose a reason for hiding this comment

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

Overall good. Just a couple of general things:

  1. Why are we using typing_extensions instead of typing? The canonical module is typing; typing_extensions is a non-standard package. If we do want to use typing_extensions, then we need to add it to the dependencies in pyproject.toml

  2. In the future this could maybe be split into a couple of different PRs - one for updating dependencies and fixing breaking changes, one for changing the config from MappingProxyType to ConfigDict, etc, and maybe a separate PR just for updating the test cache.

aana/configs/db.py Show resolved Hide resolved
@movchan74
Copy link
Contributor Author

In the future this could maybe be split into a couple of different PRs - one for updating dependencies and fixing breaking changes, one for changing the config from MappingProxyType to ConfigDict, etc, and maybe a separate PR just for updating the test cache.

It's all part of the same upgrade, doesn't make sense for me to split it.
"changing the config from MappingProxyType to ConfigDict" was part of the pydantic migration.
"updating the test cache" was also part of the migration. The cache was using old pydantic models and the tests were failing because of it.

@movchan74
Copy link
Contributor Author

@evanderiel @HRashidi I've updated the submodule for Mobius Pipeline and merged the main branch. Please, take another look.

Copy link
Contributor

@HRashidi HRashidi left a comment

Choose a reason for hiding this comment

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

👍🏽

@movchan74 movchan74 merged commit 6ac2c78 into main Feb 26, 2024
2 checks passed
@movchan74 movchan74 deleted the pydantic_v2_migration branch February 26, 2024 16:41
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.

3 participants