Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Widget on Google Cloud Vertex AI Workbench Notebook #1463

Open
toki-debug opened this issue May 10, 2024 · 11 comments · Fixed by #1468
Open

Widget on Google Cloud Vertex AI Workbench Notebook #1463

toki-debug opened this issue May 10, 2024 · 11 comments · Fixed by #1468
Assignees

Comments

@toki-debug
Copy link

toki-debug commented May 10, 2024

Hi! I would like to use a widget for Google Cloud Vertex AI Notebook, but I'm a little confused about how to do it properly. I tried to search in the documentation, but I'm not entirely sure about how to do it.

image

@bdu91
Copy link
Collaborator

bdu91 commented May 10, 2024

Hello, can you elaborate a bit about how you set up the notebook? I don't know the if proxy_url is causing the problem here and maybe try removing it?

Since you mentioned Google Cloud Vertex AI notebook, this is the path I tried:

  1. Vertex AI notebook website, click "Go to Console"
  2. this bring me to the Google Cloud Colab Enterprise page and I opened one of the "intro_gemini_pro_python.ipynb" notebooks (any notebook should work or create a new one)
  3. I then connected to a default Vertex AI runtime, pip installed LIT there and tried one of our examples (basically copied the code into the notebook opened at step 2 and used a GPT2 model instead of Gemma since the runtime at step 2 is CPU) and was able to load the widget.

@toki-debug
Copy link
Author

Hello! :)
I'm currently using Vertex AI Workbench. I've gained access to a project machine and am utilizing JupyterLab notebooks there. I would like to know if it's possible to use widgets there. When running just with the port, it displays the same page as shown with the proxy.

image

@toki-debug toki-debug changed the title Widget on Google Cloud Vertex AI Notebooks Widget on Google Cloud Vertex AI Workbench Notebook May 13, 2024
@bdu91
Copy link
Collaborator

bdu91 commented May 13, 2024

Hello, I am relatively new to Vertex AI Workbench, but I also tried to render LIT widget and it seems to work fine, here is the process I went through:

  • On the Workbench entry page, I started an instance at zone "us-central1-a", version "M115", machine type "Efficient Instance: 4 vCPUs, 16 GB RAM" and clicked "OPEN JUPYTERLAB".
  • This brings me to a new page that opens up an ipynb notebook. I did the necessary pip install in the terminal, and copied the code from the public demo found on Github and it seems to work fine, with screenshot attached.

Let me know if there is anything different you've done that could cause the issue.
VertexAI_workbench_LIT

@toki-debug
Copy link
Author

I see, so it might be a problem with my version. I'm currently working with lit-nlp Version 0.5.0, as I need to use Python 3.9 to run my models :/

@RyanMullins
Copy link
Member

I might be able to relax the Python version requirements to include 3.9... I'll investigate and get back to you later this week or early next.

Out of curiosity, which modeling framework are you using that requires Py3.9?

@toki-debug
Copy link
Author

Oh, thanks, that would be very helpful! :)
The model pipeline doesn't actually require Python 3.9, but there are some important dependencies from where I get the model trained that needs this version.

@toki-debug
Copy link
Author

Hey, @RyanMullins! Just checking in, any updates on it?

@RyanMullins
Copy link
Member

Sorry, had to deal with some other tasks this week. Planning to look at this tomorrow (Fri 24 May 2024) and give you and update. We don't use many Py3.10+ features, though I know we use strict=True on a few zip() calls that will need to be reverted. Hopefully it's not much more complicated than that.

@RyanMullins RyanMullins self-assigned this May 23, 2024
@toki-debug
Copy link
Author

I completely understand that other tasks can take priority and I sincerely appreciate your efforts on this matter! Looking forward to your update tomorrow. Thanks for your efforts on this! :)

@RyanMullins RyanMullins linked a pull request May 24, 2024 that will close this issue
@RyanMullins
Copy link
Member

@toki-debug the PR above addresses the Python 3.9 compatibility issues (thankfully they were all minor). We aren't planning a formal release for about another month, so you'll need to install the dev branch via git in the meantime.

pip install git+https://github.com/PAIR-code/lit.git@dev

@toki-debug
Copy link
Author

Thank you so much, @RyanMullins! I will test it as soon as possible and let you know if everything is working as it should. Thanks again for being so attentive and fast; I really appreciate your efforts! 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants