kitzeslab / opensoundscape

Open source, scalable software for the analysis of bioacoustic recordings
http://opensoundscape.org
MIT License
137 stars 16 forks source link

wandb error in Jupyter notebook "TypeError: _WandbInit._resume_backend() takes 1 positional argument but 2 were given" #923

Closed louisfh closed 2 weeks ago

louisfh commented 10 months ago

This is an issue with wandb and ipython, not specifically opensoundscape. But I am posting it here so we can:

  1. Consider updating wandb dependency to fix the issue.
  2. Ensure anyone else who runs into the issue using opensoundscape has documentation.

After running wandb.login, any cell executed in a jupyter notebook results in the following error.

TypeError                                 Traceback (most recent call last)
TypeError: _WandbInit._resume_backend() takes 1 positional argument but 2 were given
Error in callback <bound method _WandbInit._pause_backend of <wandb.sdk.wandb_init._WandbInit object at 0x7fcc087ff400>> (for post_run_cell), with arguments args (<ExecutionResult object at 7fcc19293e20, execution_count=3 error_before_exec=None error_in_exec=None info=<ExecutionInfo object at 7fcc19293f10, raw_cell="2+2" store_history=True silent=False shell_futures=True cell_id=vscode-notebook-cell:Untitled-1.ipynb?jupyter-notebook#X10sdW50aXRsZWQ%3D> result=4>,),kwargs {}:

This appears to be a wandb issue caused in versions of ipython >8.16.1. See: https://github.com/wandb/wandb/issues/6546

A workaround is to: pip install ipython==8.16.1

This issue is apparently fixed in wandb v0.16.0.

louisfh commented 10 months ago

@sammlapp Do you know why we specified wandb = "^0.13.4" for our wandb dependency? Seems like 0.16.0 works too.

sammlapp commented 9 months ago

nope not sure why. I think upgrading the dependency sounds good, we'll see if it breaks anything

sammlapp commented 2 months ago

@louisfh maybe we can close this, wandb version is now >=0.17. Does the error still occur anywhere?