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.

[Q] How to avoid data averaging when logging to metric across multiple runs?

See original GitHub issue

Hello, I’m trying to log data points for the same metric across multiple runs (wandb.init is called repeatedly in between each data point) and I’m unsure how to avoid the behavior seen in the attached screenshot…

Instead of getting a line chart with multiple points, I’m getting a single data point with associated statistics. In the attached e.g., the 1st data point was generated at step 1,470 and the 2nd at step 2,940…rather than seeing two points, I’m instead getting a single point that’s the average and appears at step 2,205.

image

My hunch is that using the resume run feature may address my problem, but even testing out this hunch is proving to be cumbersome given the constraints of the system I’m working with…

Before I invest more time in my hypothesized solution, could someone confirm that the behavior I’m seeing is, indeed, the result of logging data to the same metric across separate runs without using the resume feature?

If this is the case, can you confirm or deny my conception of how to use resume?

Initial run:

  1. run = wandb.init()
  2. wandb_id = run.id
  3. cache wandb_id for successive runs

Successive run:

  1. retrieve wandb_id from cache
  2. wandb.init(id=wandb_id, resume="must")

Is it also acceptable / preferable to replace 1. and 2. of the initial run with:

  1. wandb_id = wandb.util.generate_id()
  2. wandb.init(id=wandb_id)

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
lukascommented, Sep 7, 2022

Hi! Using id and resume definitely works for your use case.

The reason you are seeing a single datapoint is the line chart averages points over runs by default when they are grouped. If you want to turn this off you can do so in the UI in the upper right.

image
0reactions
thanos-wandbcommented, Sep 12, 2022

Hi @a-rich thank you for confirming this. I will close the ticket for now, but feel free to re-open it by posting here if you have any further questions and we will be happy to keep investigating!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to avoid data averaging when logging to metric across ...
How to avoid data averaging when logging to metric across multiple runs? · run = wandb.init() · wandb_id = run.id · cache wandb_id...
Read more >
New Relic data types: metrics, events, logs, and traces (MELT)
An overview of the MELT data New Relic reports: metrics, events, logs, and traces (spans).
Read more >
Metric Monitor - Datadog Docs
Compare values of a metric with a user defined threshold. ... On each alert evaluation, Datadog calculates the average, minimum, maximum, or sum...
Read more >
Building a reliable and scalable metrics aggregation and ...
Outline:Why we need a metrics aggregation & monitoring system? Various components of a good metrics aggregation & monitoring systemInsight ...
Read more >
Breaking Down Mean Average Precision (mAP) | by Ren Jie Tan
Precision and recall are two commonly used metric to judge the performance of a given classification model. To understand mAP, we would need...
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