return True
if self.has_symmetrical_tokens:
left_token_count = sample_in_progress.count(self.symmetrical_token_left)
right_token_count = sample_in_progress.count(self.symmetrical_token_left)
if left_token_count and (left_token_count - right_token_count == 0):
return True
return False
After Change
Returns:
True if the sample is "complete", else False to continue sampling.
return any(t.SampleIsComplete(sample_in_progress) for t in self.terminators)
@staticmethod
def _ComputeHash(config: sampler_pb2.Sampler) -> str: