assignment.auto_batch_assignment
def auto_batch_assignment(cost_matrices: list[torch.Tensor], prefer: Prefer | str = Prefer.AUTO) -> list[tuple[torch.Tensor, torch.Tensor, torch.Tensor]]Solve a batch of LAPs via the empirically-fastest backend.
Parameters
| Name | Type | Description |
|---|---|---|
| cost_matrices | list of torch.Tensor | Per-problem cost matrices. Shapes may differ. |
| prefer = Prefer.AUTO | Prefer or str | Backend preference. Default :attr:`Prefer.AUTO`. |
Returns
list of tuple — Per-problem ``(matches, unmatched_rows, unmatched_cols)`` triples.
Raises
- RuntimeError — If ``prefer="cuda"`` is requested without a CUDA device.
Source: unitrack/assignment/_auto.py:96