nvalchemi.csp.hooks.DeduplicationEngine#

class nvalchemi.csp.hooks.DeduplicationEngine(*args, **kwargs)[source]#

Structural interface for generation-time Batch deduplication.

Implementations return a one-dimensional torch.bool keep mask of length batch.num_graphs on exactly batch.device and must not mutate the supplied Batch in place. Engines may keep their own state across calls; the bundled radial engine compares only within each input Batch.

deduplicate(batch)[source]#

Return a torch.bool [batch.num_graphs] mask on batch.device.

Parameters:

batch (Batch)

Return type:

Tensor