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.

Insert logged times into state

See original GitHub issue

🚀 Feature

By default, Engine measures times for single epoch and total run. These times are logged with engine.logger: https://github.com/pytorch/ignite/blob/efc45a79ee0a5bf8105c3caff194758439db2426/ignite/engine/engine.py#L793-L796 and https://github.com/pytorch/ignite/blob/efc45a79ee0a5bf8105c3caff194758439db2426/ignite/engine/engine.py#L497-L500

Idea is to put these times (at least time_taken for epoch and total time) into engine.state under a name (e.g. “times”). Such that we can also use this information without need to use Timer or setup logger.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
vfdev-5commented, Apr 22, 2020

@erip yes, both can be helpful and I agree with you about

I think it makes most since to just maintain a single value for now and let the user determine if/how they want to maintain that list if necessary.

We can leave to the user the way to store all times, as other values we store in the state, e.g. metrics, batch, output etc.

1reaction
vfdev-5commented, Apr 21, 2020

@erip Actually, we above snippet is wrong. I fixed it.

it would imply that a timer of some sort will need to be instantiated internal to Engine.state, right?

Yes, in run method or even in State by default…

I’m trying to think through how the Δt will be computed in the log_times call above.

Maybe we do not need any deltas to compute as

  • time_taken in _run_once_on_dataset will give the time for 1 epoch.
  • time_taken in _internal_run will give the time for complete run.

Does it sound good ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Add a time-in-state measure to a Power BI report
Learn how to add a time-in-state measure to an existing Power BI report based on Analytics for Azure DevOps.
Read more >
sql - Why does an insert query occasionally take so long to ...
I insert data into it, and sometimes a insert query takes > 2 seconds to run. There are no reads on this table...
Read more >
SQL Server Transaction Log Growth Monitoring and ...
These SQL Transaction Log records will be in pending replication state until these tracked changes are replicated to the subscriber database, in ......
Read more >
Log time on an issue | Jira Software Cloud
Open an issue and choose Work log in the activity section at the bottom of the issue. Find the time log entry and...
Read more >
Log Insert Lag Time widget
The Log Insert Lag Time widget displays how many seconds the database is behind in processing the logs. Click the edit icon in...
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