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.

runs in loop don't finish

See original GitHub issue
  • Weights and Biases version: 0.8.36
  • Python version: 3.7
  • Operating System: Ubuntu 16.04.6

The problem is if I run many runs in a loop, every runs will last to the end of program but not the beginning of its next run.

according to the advice of #951, I tried

import time
for _ in range(2):
    run = wandb.init(reinit=True)
    with run:
        run.log({'metric':10})
    time.sleep(10)

But still I got this image

Question

  • How can I make the run finished when init a new run ? (so it can record correct exec time)
  • Does this mean if I run 15 run in a loop, I will get 15 threads exist at the same time ?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:15 (6 by maintainers)

github_iconTop GitHub Comments

4reactions
vanpeltcommented, Jun 9, 2020

We’ll follow up here when it’s fixed.

2reactions
raubitsjcommented, Sep 1, 2020

The preferred syntax for the loop would be:

import wandb
for x in range(10):
    run = wandb.init(project="runs-from-for-loop", reinit=True)
    for y in range (100):
        run.log({"metric": x+y})
    run.join()

or:

for x in range(10):
    run = wandb.init(project="runs-from-for-loop", reinit=True)
    with run:
        for y in range (100):
            run.log({"metric": x+y})
Read more comments on GitHub >

github_iconTop Results From Across the Web

runs in loop don't finish · Issue #1081 · wandb/wandb - GitHub
The problem is if I run many runs in a loop, every runs will last to the end of program but not the...
Read more >
Why is this code not working ? Why does It stops looping
Each time the loop iterates it counts the number of times it has run, starting from 0. It's automatic - you don't need...
Read more >
Java program won't finish method - exits after a for loop with ...
Basically - it won't complete the method, it just exits the method after the for loop is done without any warnings or errors...
Read more >
For-loop fundamentals | Computational Methods in the Civic ...
A loop is a programming construct in which we define a block of code that we want the computer to execute repeatedly, as...
Read more >
Loops in Ruby - performing repeated operations on a data set
Loops and iterators in Ruby are a great way to perform repeated operations on a data set. Step by step tutorial for the...
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