Skip to content

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

Merged
imbajin merged 29 commits intoapache:mainfrom
returnToInnocence:poetry-struct-test
Jan 16, 2025
Merged

feat(llm): use poetry to manage the dependencies#149
imbajin merged 29 commits intoapache:mainfrom
returnToInnocence:poetry-struct-test

Conversation

@returnToInnocence
Copy link
Copy Markdown
Collaborator

@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
Copy Markdown
Collaborator

we don't need requirements.txt now?

Comment thread hugegraph-llm/pyproject.toml
@returnToInnocence
Copy link
Copy Markdown
Collaborator 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

Comment thread .github/workflows/check-dependencies.yml Outdated
Comment thread .github/workflows/check-dependencies.yml Outdated
Comment thread .licenserc.yaml Outdated
Comment thread hugegraph-llm/README.md Outdated
Comment thread hugegraph-llm/README.md Outdated
Comment thread hugegraph-llm/requirements.txt Outdated
@imbajin imbajin changed the title feature(llm): managed using poetry feat(llm): use poetry to manage the dependencies Jan 13, 2025
@MrJs133
Copy link
Copy Markdown
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
Copy Markdown
Collaborator 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
Comment thread hugegraph-llm/README.md
Copy link
Copy Markdown
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
@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