You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The example notebook has a comment saying that LIT does not work on Colab since the Colab python version is fixed to 3.7.
I have been trying to get LIT to work on Colab by upgrading the Python version, and I think I have some progress? I can import the lit_nlp library and create the widget, the only issue is widget.render() produces a blank output.
I'm hoping the LIT devs can provide troubleshooting input on how I might get this to work.
Current notebook version.
The text was updated successfully, but these errors were encountered:
What helped me fix this problem is to manually assign is_colab to true after importing notebook in colab
Here's a short example of what I ended up doing...
fromlit_nlpimportnotebooknotebook.is_colab=True# Rest of code cellswidget=notebook.LitWidget({'model': lit_model}, {'ds': lit_dataset})
# lit_model is a lit_nlp.api.model.Model instance# lit_dataset is a lit_nlp.api.dataset.Dataset instancewidget.render(height=600)
Colab is running Python v3.10 as of Apr 2023 (see googlecolab/colabtools#3572) so the Notebooks should work out of the box again. I've recently submitted a PR to remove this warning text (806e41d), but this may not update on Colab until our next release.
Closing this issue for now, but please re-open or file a new one if you run into any issues.
Hey there,
The example notebook has a comment saying that LIT does not work on Colab since the Colab python version is fixed to 3.7.
I have been trying to get LIT to work on Colab by upgrading the Python version, and I think I have some progress? I can import the lit_nlp library and create the widget, the only issue is widget.render() produces a blank output.
I'm hoping the LIT devs can provide troubleshooting input on how I might get this to work.
Current notebook version.
The text was updated successfully, but these errors were encountered: