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 3 years ago
- Reactions: 9
- Comments: 27 (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 3 years 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.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.
Here’s a clue: this seems to be some kind of interaction between
wandbandjupyter-notebook. If i run those same lines of code in CLI Python for that environment, i see no errors!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.
I’m seeing this as well. Started after i rebuilt my docker container that pulled the most recent version of wandb yesterday (0.15.12) it has a weird interaction with jupyterlab(running Version 4.0.8). I’m not even importing wandb, and just by running trl.sfttrainer i get the error:
But not only then, but all subsequent cell executions thereafter.
I literally get the error while running the single command
print('hello world')talk about imposter syndrome when you can’t even run hello world 😉