googlecolab / colabtools

Python libraries for Google Colaboratory
Apache License 2.0
2.12k stars 692 forks source link

Avoid popping the custom widgets snippet for local runtimes #4525

Open craigcitro-ant opened 2 months ago

craigcitro-ant commented 2 months ago

Describe the current behavior

Currently, when using a local runtime, any use of ipywidgets>=8 will pop up the code snippets pane with a suggestion to enable custom widgets:

image

There are two issues here:

  1. enabling custom widgets won't help, as the root cause is that ipywidgets 8+ still isn't supported.
  2. orthogonal to the widgets issue, popping up a custom google.colab-using snippet for a local runtime doesn't help -- we still can't easily install that package. 😉

This issue only tracks (2), but I'm happy to file an issue for (1) if someone has cycles.

3020 is the closest thing I could find to a tracking bug for (1), but it's closed; IMO would be worth a new bug tracking Pete's "... roll out proper support for ipywidgets>=8.0.0" bit in this comment.

Describe the expected behavior

Don't pop up a code snippet I can't use.

What web browser you are using

Chrome

Additional context

👋

craigcitro-ant commented 2 months ago

oh, man, i'm falling apart here. repro steps!

  1. Start a local runtime
  2. python3 -m pip install ipywidgets>=8.0.0
  3. Run any tqdm-using snippet, eg:

    from tqdm.auto import tqdm
    
    for i in tqdm(range(3)):
      print(i)
sagelywizard commented 2 months ago

Hi Craig! 👋🙂

Seems like it'd be good to have a tracking issue for (1) even if we don't immediately have the bandwidth.

For (2), I was able to repro. Found the relevant code in the UI. Not sure the best way to plumb the ipywidgets version through to the UI. Perhaps Katlyn knows, I'll ask.

EvanWiederspan commented 2 months ago

Tracking internally as b/337035308

prhbrt commented 4 weeks ago

This seems to be a work-around:

pip3 install 'ipywidgets<8'

+restart notebook.