Skip to content

Update dependency management #1381

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

chimaerase
Copy link

@chimaerase chimaerase commented Jul 25, 2025

[please review the Contribution Guidelines prior to submitting your pull request. go ahead and delete this line if you've already reviewed said guidelines.]

What does this PR do?

Provide baseline updates to use pyproject.toml + poetry for more automated dependency management and deployment (#1379), as well as differentiating between CPU- and GPU-targeted installs. Likely some minor deployment-related details are still missing here (which I can't test), but I'm hoping this is a useful baseline to work from. Builds on an earlier draft PR I submitted to the tpot2 repo, but now CI tests are updated / passing.

Should resolves several issues:

  1. The need to hard-code dependency versions for sub-packages
    I left TODO's in pyproject.toml with a partial list of those I didn't need to make the tests pass.
  2. Auto-inclusion of GPU (CUDA) support that adds unnecessary bloat when not in use
  3. Needing multiple files to track dev/production dependencies separately
  4. Makes update_checker optional (opt-in)
    In context of my closed source apps that use TPOT, this check is overkill that adds unnecessary / confusing output that end users aren't familiar with & don't know how to resolve. I see the value for other users, but there doesn't appear to be any way, e.g. with configuration, to silence the very-aggressive update checks (can appear minutes after a new TPOT release).

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

# Install with xghoost-cpu (no GPU support)
poetry install --extras cpu
# Install with xghoost (includes NVIDIA CUDA support -- only needed when available)
poetry install --extras cuda
# Install development packages
poetry install --with dev

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

Where should the reviewer start?

pyproject.toml

How should this PR be tested?

Tests in tox.ini are already passing. There may be some additional testing needed to make this work in deployment to pypi. I drafted the code for that, but don't have access to test deployments for TPOT (or any experience publishing packages to pypi yet).

Any background context you want to provide?

I'm again short on time to help with this, so may not be able to address comments quickly (or at all). I'm hoping this is a big boost in a helpful direction, and happy for others to take the ball and run with it.

What are the relevant issues?

[you can link directly to issues by entering # then the number of the issue]

Screenshots (if appropriate)

Questions:

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

@chimaerase chimaerase marked this pull request as ready for review July 28, 2025 22:16
@chimaerase
Copy link
Author

chimaerase commented Jul 28, 2025

Changed this to "ready for review". Likely there are a few minor issues remaining, especially as they relate to pushing to PyPi, but worth looking over at this point with tests passing. Not sure I can commit to polishing this, but I hope it's at least a very significant boost toward the final solution.

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