Skip to content

Modernize dependency management #170

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

chimaerase
Copy link

@chimaerase chimaerase commented Feb 18, 2025

What does this PR do?

Provide baseline updates to use poetry for more automated dependency management, as well as differentiating between CPU- and GPU-targeted installs. Likely some details are missing here, but I'm hoping this is a useful baseline to work from that resolves several issues:

  1. The need to hard-code dependency version for sub-packages
  2. Auto-inclusion of GPU (CUDA) support that adds unnecessary bloat when not in use
  3. Auto-inclusion of test packages in the production software / duplicated dependencies in multiple files

New local dev install process would be, e.g.:

poetry install --with cpu
or poetry install --with cuda
or poetry install --with test

Downstream pypi downloads of published versions would support extras, e.g. pip install tpot2[cpu] or similar.

Where should the reviewer start?

pyproject.toml

How should this PR be tested?

With TPOT's existing CI/CD or internal test process, which I'm unfamiliar with nuances of, but I hope this is a big boost in a helpful direction. Unfortunately, I'm at the limit of time I can justify spending on this, but I hope this is a helpful starting point!

What are the relevant issues?

#146

Screenshots (if appropriate)

Questions:

  • Do the docs need to be updated?
    Yes
  • Does this PR add new (Python) dependencies?
    No

@chimaerase chimaerase marked this pull request as ready for review February 18, 2025 06:11
@chimaerase chimaerase marked this pull request as draft February 18, 2025 06:11
@chimaerase
Copy link
Author

@perib or others, I'm uncertain about notifications you'll receive related to draft PR's, but here it is.

@chimaerase chimaerase force-pushed the dependency-management branch from a67f7a0 to b520b00 Compare February 18, 2025 17:28
@chimaerase
Copy link
Author

Force pushing again to pull in lessons learned from another project:

  • Updating pyproject.toml to use updated dependency specification supported in poetry 2.0
  • Use optional dependencies instead of now-deprecated extras (which still locked, but didn't install as expected).

I probably can't contribute much more to this, but again hope it's a useful starting point.

@chimaerase
Copy link
Author

Force pushing to fix typo, and change "gpu" term to "cuda" to match other repos. I'll also update the PR description to matche.

@chimaerase chimaerase force-pushed the dependency-management branch from 0266783 to c3514ed Compare April 17, 2025 18:47
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