uw-ipd / tmol

TMol
Apache License 2.0
31 stars 3 forks source link

bump python/torch and update packaging (#288) #290

Closed aleaverfay closed 7 months ago

aleaverfay commented 8 months ago

This enables tmol to work with the latest torch (2.2) and python (3.12). It also (hopefully) simplifies the packaging of tmol so that it can be used more easily in a greater number of environments.

To support newer pytorch versions the compiler std version is bumped to c++17. There are also some additions of explicit device placements for tensors because torch has gotten more strict about automatically moving tensors in indexing operations. The deprecated torch.testing.assert_allclose is replaced by torch.testing.assert_close (see RFC: retire torch.testing.assert_allclose in favor of torch.testing.assert_close pytorch/pytorch#61844) To support python >= 3.11 typish is removed as a dependency and replaced by a vendored version which fixes a bug in equality comparison of subscripted types. package configuration is moved into pyproject.toml and now includes specification of dependencies so that they are automatically fetched on install. This also enables installing directly from the git repo ( pip install git+https://github.com/kleinhenz/tmol.git@bump_versions) git version information is embedded into the library and available at tmol.version using setuptools_scm. The Dockerfile is simplified by using micromamba base images in the env.yml the cudatoolkit is changed to the version provided by nvidia at nvidia/label/cuda-12.1.1::cuda. All other dependencies are moved to pip since it makes propagating dependencies to other projects easier. A frozen set of known good dependency versions and a script to update them are provided in environments/linux-cuda.

The new order of operations for installing the conda/mamba environment for development is:

   mamba env create -f environments/linux-cuda/env.yml
   mamba activate tmol
   pip install -e .[dev]

Authored by Joseph Kleinhenz kleinhej@gene.com

codecov[bot] commented 8 months ago

Codecov Report

Attention: Patch coverage is 92.40506% with 18 lines in your changes are missing coverage. Please review.

Project coverage is 95.25%. Comparing base (ace29a8) to head (f933458). Report is 8 commits behind head on master.

Files Patch % Lines
tmol/tests/support/test_database_converters.py 0.00% 12 Missing :warning:
tmol/utility/reactive.py 57.14% 6 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #290 +/- ## ========================================== + Coverage 94.93% 95.25% +0.31% ========================================== Files 374 383 +9 Lines 23883 25588 +1705 ========================================== + Hits 22673 24373 +1700 - Misses 1210 1215 +5 ``` | [Flag](https://app.codecov.io/gh/uw-ipd/tmol/pull/290/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uw-ipd) | Coverage Δ | | |---|---|---| | [_shrug_Testing_CPU](https://app.codecov.io/gh/uw-ipd/tmol/pull/290/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uw-ipd) | `90.78% <79.74%> (+0.75%)` | :arrow_up: | | [_shrug_Testing_CPU_debug_w_o_jit](https://app.codecov.io/gh/uw-ipd/tmol/pull/290/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uw-ipd) | `92.48% <76.79%> (?)` | | | [_shrug_Testing_CPU_w_o_jit](https://app.codecov.io/gh/uw-ipd/tmol/pull/290/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uw-ipd) | `?` | | | [_shrug_Testing_CUDA](https://app.codecov.io/gh/uw-ipd/tmol/pull/290/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uw-ipd) | `92.85% <92.40%> (+0.47%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uw-ipd#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

aleaverfay commented 7 months ago

I think this is ready to merge