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.

Multiple runs in notebook cells are not properly synced (wrong "state" for all but last)

See original GitHub issue

wandb --version && python --version && uname

  • Weights and Biases version: 0.8.36
  • Python version: Python 3.6.9 :: Anaconda, Inc.
  • Operating System: Linux (Ubuntu 18.04) and macOS (10.15.4)

Description

I’m trying to execute several runs from a single cell in a Jupyter Notebook (for example, doing cross-validation with each split as a separate run.)

All runs execute and their results are logged, however, only the last run shows up as being finished — all earlier runs still show as running (until they are registered as crashed some time later).

I would expect all successfully completed runs to have state finished.

(When running from a script, everything works fine.)

What I Did

A small example to illustrate the problem:

import wandb
import time

for i in range(10):
    with wandb.init(project="sandbox", name=f"wandb-test-{i + 1}", reinit=True) as run:
        run.summary['accuracy'] = (i + 1) / 10
        time.sleep(5)

Running this in a notebook cell results in the last run (“wandb-test-10”) having state finished, but runs “wandb-test-1” through “wandb-test-9” still show up as running.

If instead the same code is run outside of a notebook in a separate script, all runs are correctly registered as being finished.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
tyomhakcommented, Jul 20, 2020

This is a bug, that we’re working on. Running the same code in a script through a cmd should work just fine, but there seems to be an issue with running experiments in a loop in a notebook. Sorry for the inconvenience.

Also, I would suggest upgrading your wandb. The latest version is 0.9.3

0reactions
ariG23498commented, Dec 3, 2020

Hey folks in the past year we’ve majorly reworked the CLI and UI for Weights & Biases. We’re closing some stale issues. Please comment to reopen.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Multiple runs in notebook cells are not properly synced (wrong ...
I'm trying to execute several runs from a single cell in a Jupyter Notebook (for example, doing cross-validation with each split as a...
Read more >
IPython Notebook cell multiple outputs - Stack Overflow
IPython Notebook shows only the last return value in a cell. The easiest solution for your case is to use two ...
Read more >
Develop code in Databricks notebooks
This page describes how to develop code in Databricks notebooks, including autocomplete, automatic formatting for Python and SQL, combining ...
Read more >
The Notebook | Query and analyze data - Mode Support
When Notebook output is included in the Report, that Report's schedule will re-run the Notebook so all of the data stays in sync....
Read more >
Working efficiently with JupyterLab Notebooks
A Python package will allow you to structure your code nicely over several modules and even subpackages, you can easily create unit tests...
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