function

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

NameTypeDescription
cost_matriceslist of torch.TensorPer-problem cost matrices. Shapes may differ.
prefer = Prefer.AUTOPrefer or strBackend 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