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.

why does wandb.restore() need a wandb.init()

See original GitHub issue

Hi, suppose I want to just download a pre-trained model for inference purposes without creating a new run via a separate script. Why do I have to create a wandb.init() to avoid the following error?

wandb.errors.error.Error: You must call wandb.init() before wandb.restore()

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
kouroshHakhacommented, Nov 14, 2020

I tested this, and it seems that

file = wandb.restore('foo.yaml', run_path=<wandb_run_path>)
content = read_yaml(file)

returns the correct content only if I still do a wandb.init(project='fake_project') before all of this. I can provide more info if you need an example to debug.

1reaction
issue-label-bot[bot]commented, Oct 22, 2020

Issue-Label Bot is automatically applying the label question to this issue, with a confidence of 0.96. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Save & Restore Files - Documentation - Weights & Biases
This guide first demonstrates how to save files to the cloud with wandb.save , then demonstrates how they can be re-created locally with...
Read more >
why does wandb.restore() need a wandb.init() · Issue #1403
The command line wandb restore is an easy way to get a pretrained model but your point is valid we should not require...
Read more >
wandb.save() · GitBook
Put a file in the wandb run directory, and it will get uploaded at the end of the run. If you're resuming a...
Read more >
wandb — PyTorch Lightning 1.8.5.post0 documentation
A new W&B run will be created when training starts if you have not created one manually before with wandb.init() . Log metrics....
Read more >
wandb - PyPI
If you are using docker to run your code, we provide a wrapper command wandb docker that mounts your current directory, sets environment...
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