lightly-ai/lightly

Proper distributed tests

開放

#1,982 建立於 2026年7月14日

 (4 則留言) (0 個反應) (1 位負責人)Python (337 個分叉)auto 404
advancedenhancementhelp wanted

倉庫指標

星標
 (3,775 顆星)
PR 合併指標
 (平均合併 8天) (30 天內合併 34 個 PR)

描述

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.

Following things to be done:

  • add distributed pool to the test setup following torchmetrics (test with a single loss)
  • add to CI
  • abstract it nicely
  • expand coverage to other losses/use cases
  • get rid of tests/utils/test_dist__gather__losses.py

貢獻者指南