question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Filters don't work on custom events

See original GitHub issue

CallableEventWithFilter does not work with custom events:

from ignite.engine import Engine, EventEnum
    
def train_step(engine, batch):
    engine.fire_event(TestEvents.TEST_EVENT)
engine = Engine(train_step)

class TestEvents(EventEnum):
    TEST_EVENT = 'test_event'
engine.register_events(*TestEvents)

@engine.on(TestEvents.TEST_EVENT(every=100))
def foo(engine):
    print("hello world")

def forever():
    while True:
        yield 0.
    
engine.run(forever(), max_epochs=10, epoch_length=1)

The error is:

RuntimeError: Unknown event name '<event=TEST_EVENT, filter=<function CallableEventWithFilter.every_event_filter.<locals>.wrapper at 0x7fb7d1244710>>'

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
amatsukawacommented, Jan 14, 2021

Ah, awesome! Thanks for the clarification!

1reaction
vfdev-5commented, Jan 13, 2021

Hey @amatsukawa, nice to see you here again 😃 thanks for reporting, I’ll take a look !

Read more comments on GitHub >

github_iconTop Results From Across the Web

Custom Filter doesn't work - WordPress.org
I'm using the wp event manager plugin on WordPress and I'm trying to custom it. I created some custom fields in the back-end...
Read more >
Use custom conversions to filter events in Meta Events Manager
To use custom conversions to filter events: Go to Meta Events Manager. Click Custom conversions in the top-left menu. Click Create custom conversion....
Read more >
Custom filter not working on a team-managed project
The goal is to use a custom filter to get sub-tasks of a team-managed project visible on the backlog, board or roadmap functionalities....
Read more >
firebase - Filtering event by custom audience doesn't work
I am having a problem with filtering event by custom audience. Here is what I did: I have created a custom event with...
Read more >
JetSmartFilters does not trigger custom events #2181 - GitHub
The "support" suggested to use the event "jet-filter-content-rendered", but this string does not exist anywhere in the code.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found