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

feat(llm): use poetry to manage the dependencies #149

Merged
merged 29 commits into from
Jan 16, 2025

Conversation

returnToInnocence
Copy link
Contributor

@returnToInnocence returnToInnocence commented Dec 27, 2024

Background

Originally, we used pip to install modules by downloading and installing all the dependencies. pip does not manage this, but simply removes the module, leaving behind a bunch of dependencies that were installed when the module was downloaded and installed, which can cause conflicts when installing other libraries with this legacy and no longer useful library

Which file change, why?

References

  1. https://python-poetry.org/docs/
  2. https://github.com/microsoft/graphrag
  3. https://python-poetry.org/docs/pyproject/
  4. https://python-poetry.org/docs/dependency-specification/
  5. https://pypi.org/project/gradio/

@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Dec 27, 2024
@github-actions github-actions bot added the llm label Dec 27, 2024
@dosubot dosubot bot added the dependencies Pull requests that update a dependency file label Dec 27, 2024
@ChenZiHong-Gavin
Copy link
Contributor

we don't need requirements.txt now?

@returnToInnocence
Copy link
Contributor Author

we don't need requirements.txt now?

Yes, instead of the requirements.txt, we'll record versions through 'tool.poetry.dependencies' and poetry.lock

.github/workflows/check-dependencies.yml Outdated Show resolved Hide resolved
.github/workflows/check-dependencies.yml Outdated Show resolved Hide resolved
.licenserc.yaml Outdated Show resolved Hide resolved
hugegraph-llm/README.md Outdated Show resolved Hide resolved
hugegraph-llm/README.md Outdated Show resolved Hide resolved
hugegraph-llm/requirements.txt Outdated Show resolved Hide resolved
@imbajin imbajin changed the title feature(llm): managed using poetry feat(llm): use poetry to manage the dependencies Jan 13, 2025
@MrJs133
Copy link
Contributor

MrJs133 commented Jan 13, 2025

Perhaps we can add the command poetry shell after setting up the environment.
Beginners may not know that they need to execute poetry shell.

@returnToInnocence
Copy link
Contributor Author

returnToInnocence commented Jan 14, 2025

Perhaps we can add the command poetry shell after setting up the environment. Beginners may not know that they need to execute poetry shell.

@MrJs133 Thanks for your review and tips! 🫡

💡By creating a new virtual environment and using poetry to install the dependencies, instead of using poetry shell, we run it with python3 -m hugegraph_llm.demo.rag_demo.app. poetry shell should not be necessary

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Jan 15, 2025
@imbajin imbajin force-pushed the poetry-struct-test branch from dd2a202 to 16b28bc Compare January 16, 2025 11:03
Copy link
Member

Choose a reason for hiding this comment

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

TODO: we need to improve the doc for poetry usage (for devs)

@imbajin imbajin merged commit 88264e7 into apache:main Jan 16, 2025
10 of 11 checks passed
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file lgtm This PR has been approved by a maintainer llm size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants