Modernize dependency management
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:
- The need to hard-code dependency version for sub-packages
- Auto-inclusion of GPU (CUDA) support that adds unnecessary bloat when not in use
- 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
@perib or others, I'm uncertain about notifications you'll receive related to draft PR's, but here it is.
Force pushing again to pull in lessons learned from another project:
- Updating
pyproject.tomlto 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.
Force pushing to fix typo, and change "gpu" term to "cuda" to match other repos. I'll also update the PR description to matche.