generative-ai icon indicating copy to clipboard operation
generative-ai copied to clipboard

Added authentication for other development environments in jupyter notebooks

Open srjchsv opened this issue 2 years ago • 7 comments

In Jupiter notebooks tutorial examples https://cloud.google.com/vertex-ai/docs/generative-ai/learn-resources I was not able to authenticate in my local development environment. Current option was only for colab and workbench.

Found solution using google.oauth2 and service_account.

So I added commented authentication option for "other development environments" to jupyter notebooks tutorials.

srjchsv avatar Sep 18 '23 18:09 srjchsv

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Hi @srjchsv , thank you so much for your proposed changes -- would you mind changing the destination of the PR to the main branch, instead of dev?

polong-lin avatar Nov 20 '23 14:11 polong-lin

Hi @srjchsv , thank you so much for your proposed changes -- would you mind changing the destination of the PR to the main branch, instead of dev?

Hi @polong-lin,

Thanks for your reply!

This last commit "Merge branch 'main' into dev" was created when I solved the conflicts here in github PR. I believe my PR is targeting GoogleCloudPlatform:main from my srjchsv:dev.

If thats not the case please let me know how to change the destination of PR!

srjchsv avatar Nov 20 '23 15:11 srjchsv

In Jupiter notebooks tutorial examples https://cloud.google.com/vertex-ai/docs/generative-ai/learn-resources I was not able to authenticate in my local development environment. Current option was only for colab and workbench.

Found solution using google.oauth2 and service_account.

So I added commented authentication option for "other development environments" to jupyter notebooks tutorials.

the refactored version in latest commit uses gcloud to create credentials and auth in local development environment

srjchsv avatar Nov 25 '23 14:11 srjchsv

Excellent. This helped me. I appreciate it.

netskink avatar Nov 26 '23 15:11 netskink

Thanks for the PR -- sorry been busy but will do a review this week and merge!

polong-lin avatar Nov 28 '23 23:11 polong-lin

Allright, thanks! Have a good week!

On Wed, Nov 29, 2023, 3:08 AM Polong Lin @.***> wrote:

Thanks for the PR -- sorry been busy but will do a review this week and merge!

— Reply to this email directly, view it on GitHub https://github.com/GoogleCloudPlatform/generative-ai/pull/181#issuecomment-1830902754, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOC3W3NQXFOYMEPI6S3FTHLYGZVIBAVCNFSM6AAAAAA45DGL6OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMZQHEYDENZVGQ . You are receiving this because you were mentioned.Message ID: @.***>

srjchsv avatar Nov 29 '23 07:11 srjchsv

I re-made the commit to fix the merge conflicts due to restructuring.

holtskinner avatar Jan 10 '24 16:01 holtskinner