wandb: [CLI]: TypeError: _WandbInit._pause_backend() takes 1 positional argument but 2 were given
Describe the bug
if i used run = wandb.init(entity="bart_tadev", project='GPT-4 in Python', name="test") in jupyter notebook
error raised TypeError: _WandbInit._pause_backend() takes 1 positional argument but 2 were given
run = wandb.init(entity="bart_tadev", project='GPT-4 in Python', name="test")
wandb: Currently logged in as: bart_tadev. Use `wandb login --relogin` to force relogin
Tracking run with wandb version 0.15.12
Run data is saved locally in /data01/bart/private/kaggle/AI-gen-detector/wandb/run-20231103_163805-aqkwtf24
Syncing run [test](https://wandb.ai/bart_tadev/GPT-4%20in%20Python/runs/aqkwtf24) to [Weights & Biases](https://wandb.ai/bart_tadev/GPT-4%20in%20Python) ([docs](https://wandb.me/run))
View project at https://wandb.ai/bart_tadev/GPT-4%20in%20Python
View run at https://wandb.ai/bart_tadev/GPT-4%20in%20Python/runs/aqkwtf24
Error in callback <bound method _WandbInit._pause_backend of <wandb.sdk.wandb_init._WandbInit object at 0x7f252ade0610>> (for post_run_cell), with arguments args (<ExecutionResult object at 7f252add6e10, execution_count=4 error_before_exec=None error_in_exec=None info=<ExecutionInfo object at 7f252add79d0, raw_cell="run = wandb.init(entity="bart_tadev", project='GPT.." store_history=True silent=False shell_futures=True cell_id=[vscode-notebook-cell://ssh-remote%2B7b22686f73744e616d65223a22284750553037295f3139322e3136382e302e323335227d/data01/bart/private/kaggle/AI-gen-detector/wandb_gpt_api.ipynb#W3sdnNjb2RlLXJlbW90ZQ%3D%3D>](vscode-notebook-cell://ssh-remote%2B7b22686f73744e616d65223a22284750553037295f3139322e3136382e302e323335227d/data01/bart/private/kaggle/AI-gen-detector/wandb_gpt_api.ipynb#W3sdnNjb2RlLXJlbW90ZQ%3D%3D%3E) result=None>,),kwargs {}:
Additional Files
No response
Environment
WandB version: wandb==0.15.12
OS: ubuntu 18.04
Python version: 3.11
Versions of relevant libraries:
Additional Context
No response
About this issue
- Original URL
- State: closed
- Created 8 months ago
- Reactions: 8
- Comments: 25 (10 by maintainers)
Commits related to this issue
- fix: conflict ipython/wandb Solved following the messages here: https://github.com/wandb/wandb/issues/6546 — committed to alfreedolf/build-ml-pipeline-for-short-term-rental-prices by alfreedolf 7 months ago
@drscotthawley @jason-brian-anderson @YooSungHyun sorry to hear you’re running into this issue, could you please try to downgrade your
ipythonpackage to8.16.1version, and then restart your Jupyter kernel? You can downgrade as follows from the terminal:pip install ipython==8.16.1A quick update on the issue @ here: our SDK team has implemented a fix, which has been shipped in the latest release of
wandb(v0.16.0). You can now upgradeIPythonif you are usingwandbversion0.16.0. For more details, you can check out the pull request here and our release notes. Please let us know if you’re still encountering any issues.Hey folks, we’re aware of the issue. The root cause is coming from the most recent version of IPython. We’re working on a fix.
For posterity as noted above, in the meantime time if you downgrade IPython to 8.16.1 the issue should go away.
Thanks. @thanos-wandb. Still, I want to echo @jason-brian-anderson’s question: For what reason is wandb taking control of every jupyter cell execution?
Great, we’re glad this unblocks you for now, @drscotthawley, we will raise to our SDK team and follow-up with you here. It seems something broke with latest ipython: https://pypi.org/project/ipython/8.17.2/#history
@thanos-wandb That worked! Hooray! Thank you.
fwiw, i’m running numpy ‘1.26.1’
the most interesting thing to me is that every invocation of any subsequent cell execution in jupyterlab thereafter. what is wandb doing such that every subsequent, non-related cell execution is somehow wrapped by this resume/pause method? i don’t think i’ve ever seen anything like this before
here is how i reproduced it:
gives:
and running the next cell with:
print('hello world')gives:
why is wandb even running at all in this cell? it’s like it’s @decorating every cell ?!
python isn’t wrong to assert that the method only takes 1 arg:
i’m not even sure how to start trouble shooting given the weird control over jupyter’s cell execution.
Hey all, thanks a lot for reporting this! I’m currently investigating this so will post an update as soon as I have something
Hi folks. I’m getting this a lot (e.g. for
wandb.init()andwandb.finish()andwandb.log()) on my brand-new, fresh environment with recent update to Ubuntu 22.04 LTS, using Python 3.10. I get the error with wandb versions 0.15.12 and 0.15.10. (I started with 0.15.12 and then tried downgrading, but it didn’t help.)On Discord, wandbot suggested setting
settings=wandb.Settings(start_method="fork")when I callwandb.init(), but adding that had no effect.This messaging is burdensome, in that the error appears twice even when performing non-wandb operations, e.g. even “2+2” produces the error:
I suspect the error happens when
wandb.finish()isn’t called before the user does “something” (not exactly sure what), such as restarts the kernel or runswandb.init()again.Looking at processes on my machine, I see there are currently 3 instances of
wandb-servicerunning. 2 processes might make sense as I’m doing two simultaneous runs (on two different GPUs), but not sure where the 3rd is coming from. I’ll try killing all thewandb-serviceprocesses, re-runningwandb.login(), and see if that fixes things… 🤞UPDATE: Nope. That had no effect. Error persists even after killing processes, restarting kernel, re-running wandb.login(), etc. Also tried uninstalling & re-isntalling (the latest) wandb. Nothing helped.