Move IJEPAMaskCollator to its own module, keep the old import working (#2020)
* Move IJEPAMaskCollator out of lightly.data.collate IJEPAMaskCollator is not deprecated but sits in collate.py next to the collate functions that are, so it would go down with them. Give it its own module and export it from lightly.data. Body is unchanged apart from type annotations, which the new module needs since collate.py is on the mypy exclude list and the new one isn't. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * Skip IJEPA collator tests on torch<1.11 IJEPAMaskCollator calls torch.utils.data.default_collate, added in torch 1.11, so it does not work on the minimal dependency pin. The class had no tests before, which is why this never surfaced. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * Keep IJEPAMaskCollator importable from lightly.data.collate The class was never deprecated, so moving it out was a breaking change. Re-export it from the old module behind a FutureWarning pointing at lightly.data, removed in 1.7.0. __getattr__ sits in the else branch of a TYPE_CHECKING guard so the module stays complete for type checkers: the old path resolves to the real class, and unknown names still error instead of becoming Any. Also switches the new module to `|` unions and builtin generics. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
F
fruet committed
bfa18de064ba73296ffbab501915360187f97e3b
Parent: 6c19f8b
Committed by GitHub <noreply@github.com>
on 8/13/2026, 12:55:34 PM