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.

[Feature Request] Allow user defined events to be added to Engine

See original GitHub issue

This one is more of a long shot. Today ignite provides two nested loops (epochs and batchs) with a custom callback callback function.

In some case however it requires more than two loops. For instance, in truncated backpropagation through time, one iterates over, epochs, then batches, then over time.

Another example I’m thinking about (without adding loops) is for someone working on optimization. Such a person may want to add an event between the loss.backward() and optim.step() and then swap different handles in their work without having to care bout the rest of the training loop.

One can have workarounds for both these examples, but I think it is valuable to have some way to let the user add some more loops and more events. I believe being very modular will let researchers more easily separate their code between what they are working on, and what is left untouched.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
AntoinePrvcommented, Jul 27, 2018

@alykhantejani I’d be happy to try something 😃

1reaction
AntoinePrvcommented, Jul 26, 2018

Well, why do we need events in the first place? They allow for modular and reusable code. Custom events would let contrib code present the same type of API as core ignite.

Ideally I was imagining a user interface like this:

from ignite.engine import Events
from ignite.contrib.engine import create_supervised_tbptt_trainer
# Events are added automatically by importing this module

# ...

trainer = create_supervised_tbptt_trainer(model, optimizer, loss, tbptt_step)

@trainer.on(Events.TIME_ITERATION_COMPLETED)
def log_training_loss(trainer):
    # ...
Read more comments on GitHub >

github_iconTop Results From Across the Web

[Feature request] Add ability for exclusion event log rules (monitor all ...
I'd like to monitor all application events except one with ID=12. The procedure you suggested does not allow me to do that. Do...
Read more >
Feature suggestion: Private event nodes
The “Create Event” node allows you to create a separate function or event or select an existing function or event (that matches the...
Read more >
Introduction to events - Learn web development | MDN
Events are actions or occurrences that happen in the system you are programming, which the system tells you about so your code can...
Read more >
Features and terminology in Azure Event Hubs - Microsoft Learn
Event publishers can publish events using HTTPS or AMQP 1.0 or the Kafka protocol. Event publishers use Azure Active Directory based ...
Read more >
The Events Calendar Integration - Spaces Engine
My existing suggestion for custom tabs that can accept shortcodes and content filters (https://spacesengine.com/feature-requests/custom-tabs-for-spaces/) ...
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