CallableEventWithFilter#
- class ignite.engine.events.CallableEventWithFilter(value, event_filter=None, name=None)[source]#
Single Event containing a filter, specifying whether the event should be run at the current event (if the event type is correct)
- Parameters
value (str) – The actual enum value. Only needed for internal use. Do not touch!
event_filter (Optional[Callable]) – A function taking the engine and the current event value as input and returning a boolean to indicate whether this event should be executed. Defaults to None, which will result to a function that always returns True
name (Optional[str]) – The enum-name of the current object. Only needed for internal use. Do not touch!
- Return type
Methods
Default event filter.
A wrapper for every event filter.
A wrapper for once event filter.
- static every_event_filter(every)[source]#
A wrapper for every event filter.
- Parameters
every (int) –
- Return type
Callable
- name#
The name of the Enum member.
- static once_event_filter(once)[source]#
A wrapper for once event filter.
- Parameters
once (int) –
- Return type
Callable
- value#
The value of the Enum member.