Shortcuts

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!

Methods

default_event_filter

Default event filter.

every_event_filter

A wrapper for every event filter.

once_event_filter

A wrapper for once event filter.

static default_event_filter(engine, event)[source]#

Default event filter.

Parameters
Return type

bool

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.