besskge.negative_sampler.ShardedNegativeSampler

class besskge.negative_sampler.ShardedNegativeSampler[source]

Base class for sharded negative sampler.

corruption_scheme: str

Which entity to corrupt; “h”, “t”, “ht”

flat_negative_format: bool

Sample negatives per triple partition, instead of per triple

local_sampling: bool

Sample negatives only from processing device

rng: Generator

RNG