tpot2 icon indicating copy to clipboard operation
tpot2 copied to clipboard

Modernize dependency management

Open chimaerase opened this issue 10 months ago • 3 comments

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 avatar Feb 18 '25 01:02 chimaerase

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

chimaerase avatar Feb 18 '25 06:02 chimaerase

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 avatar Feb 25 '25 00:02 chimaerase

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 avatar Apr 17 '25 18:04 chimaerase