lightly-ai/lightly

Proper distributed tests

Open

#1,982 opened on Jul 14, 2026

View on GitHub
 (3 comments) (0 reactions) (0 assignees)Python (337 forks)auto 404
advancedenhancementhelp wanted

Repository metrics

Stars
 (3,775 stars)
PR merge metrics
 (PR metrics pending)

Description

We do some proper distributed tests in tests/utils/test_dist__gather__losses.py, however those are separate from the test modules of the individual losses so adding new losses always gets forgotten or we try to mock the distributed behaviour, which often does not work very well, e.g. in #1980 .

Instead, it would be nice to have a shared distributed context that we could submit distributed tests to. This should run entirely on CPU (gloo backend for PyTorch). A really nice example for this is torchmetrics.

Let me know if you'd like to work on this and I will give some more proper guidance and detail on how this can be done.

Contributor guide