Open agorskih opened 1 year ago
tracked internally at b/302541800
I've noticed that while this thread runs, if you run progress.send_state()
in another cell, then the progress bar will update. So I think the value is being updated on the backend but for some reason it isn't being synced to the frontend.
OK here's my workaround. I use a Javascript setInterval
to routinely trigger a refresh callback every 100ms.
from google.colab import output
output.register_callback('refresh', progress.send_state)
js = IPython.display.Javascript('''
var intervalId = setInterval(colab.kernel.invokeFunction, 100, 'refresh', []);
''')
IPython.display.display(js)
Asynchronous Widgets not working properly in Colab, but works in other environments, like Binder. Example code at https://ipywidgets.readthedocs.io/en/8.0.2/examples/Widget%20Asynchronous.html#Updating-a-widget-in-the-background
Describe the current behavior Asynchronous Widget does not update.
Describe the expected behavior Asynchronous Widget updates.
What web browser you are using Safari
Additional context
https://ipywidgets.readthedocs.io/en/8.0.2/examples/Widget%20Asynchronous.html#Updating-a-widget-in-the-background
https://colab.research.google.com/drive/1_bvLqVyYdEshdsonKA0Tv2J47SGSXhYK?usp=sharing