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

before_and_after_event_filter

A wrapper for before and after event filter.

default_event_filter

Default event filter.

every_before_and_after_event_filter

A wrapper which triggers for every every iterations after after and before before.

every_event_filter

A wrapper for every event filter.

once_event_filter

A wrapper for once event filter.

static before_and_after_event_filter(before=None, after=None)[source]#

A wrapper for before and after event filter.

Parameters
Return type

Callable

static default_event_filter(engine, event)[source]#

Default event filter. This method is is deprecated and will be removed. Please, use None instead

Parameters
Return type

bool

static every_before_and_after_event_filter(every, before=None, after=None)[source]#

A wrapper which triggers for every every iterations after after and before before.

Parameters
Return type

Callable

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 (List) –

Return type

Callable

value#

The value of the Enum member.