Modalities / modalities

Modalities, a PyTorch-native framework for distributed and reproducible foundation model training.
MIT License
63 stars 8 forks source link

fix: towards torch 2.5 compatibility / fix unit tests (github actions) #266

Closed flxst closed 4 days ago

flxst commented 1 week ago

What does this PR do?

This PR fixes the failing unit tests in the main branch. There were two problems, related to torch 2.5 and github actions.

The first problem was caused by the import of a variable that changed its name from T_co in torch 2.4 (see here) to _T_co in torch 2.5 (see here). This has been fixed in 787099d1eaa45afc2c3007a7919c431737310ec3.

The second problem concerns the installation of flash attention in conjunction with torch 2.5 which is relatively new, see e.g. here. Note that---for unknown reasons---the problem only arises in github actions, not (necessarily) in local testing. As a temporary workaround, the torch version has been pinned to 2.4.1 in da5862eca9d1cd410c9354cf374609cf3b57835d. Note that this should be undone once the problem has been fixed properly. See issue #267 for more details.

General Changes

Breaking Changes

Checklist before submitting final PR

flxst commented 4 days ago

Tests successfully run through: https://github.com/Modalities/modalities/actions/runs/11795437961/job/32855145364