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

Migrates ai/docbot to uv to manage dependencies #832

Merged
merged 1 commit into from
Aug 24, 2024

Conversation

wwwillchen
Copy link
Collaborator

Our build started breaking today because llama-index packages had a version bump which causes an exception and broke docbot:

Traceback (most recent call last):
  File "/home/runner/work/mesop/mesop/ai/docbot/docs_index.py", line 144, in <module>
    llm = Gemini(model="models/gemini-1.5-flash-latest")
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/llama_index/llms/gemini/base.py", line 149, in __init__
    supported_methods = self._model_meta.supported_generation_methods
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pydantic/main.py", line 807, in __getattr__
    return self.__pydantic_private__[item]  # type: ignore
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pydantic/main.py", line 825, in __getattr__
    return super().__getattribute__(item)  # Raises AttributeError if appropriate
AttributeError: 'Gemini' object has no attribute '__pydantic_private__'. Did you mean: '__pydantic_complete__'?
./ai/docbot/deploy_to_hf.sh: line 29: cd: ./ai/docbot: No such file or directory

https://docs.astral.sh/uv/ seems like a pretty good tool for managing dependencies and enforces a lock file to prevent inadvertent dependency upgrades like the one that happened here, to ensure reproducible build.

@wwwillchen
Copy link
Collaborator Author

@richard-to going to merge this to test if it works on the main branch, but let me know what you think about uv.

@wwwillchen wwwillchen merged commit 4087683 into google:main Aug 24, 2024
2 checks passed
@wwwillchen wwwillchen deleted the uv branch August 24, 2024 05:13
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.

1 participant