EventStream.transformer.generation.generation_stopping_criteria module

class EventStream.transformer.generation.generation_stopping_criteria.MaxLengthCriteria(max_length: int)[source]

Bases: StoppingCriteria

This class can be used to stop generation whenever the full generated number of events exceeds max_length.

Keep in mind for decoder-only type of transformers, this will include the initial prompted events. :param max_length: The maximum length that the output sequence can have in number of events. :type max_length: int

class EventStream.transformer.generation.generation_stopping_criteria.StoppingCriteria[source]

Bases: ABC

Abstract base class for all stopping criteria that can be applied during generation.

class EventStream.transformer.generation.generation_stopping_criteria.StoppingCriteriaList(iterable=(), /)[source]

Bases: list