Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

How do I run my custom model training from vscode

I have run a custom model training on workbench. I want to execute this training from VSCode. Is that possible and if yes, how do i do it?

0 4 2,009
4 REPLIES 4

Hi @nitya_r 

Welcome back to Google Cloud Community.

It is possible to execute training to VSCode. Connect to a Custom User Managed Notebook

To use VSCode with a Vertex AI Workbench obtained starting from a custom container (e.g. our custom-image machine) a few additional steps are required:

  • Connect to the instance following the same procedure described in the previous section.If you check /home/jupyter directory you will find the cloned content, but you will not find libraries, environments or code configured on your container.
  • In fact, your custom container is executed on a docker instance on the virtual machine.
  • To be able to connect to the container with VSCode, your user must belong to the docker group of the remote machine. Add your user as follows.

    This reference might help you:
    https://medium.com/google-cloud/choose-the-ide-you-want-and-develop-on-vertex-ai-workbench-part-i-94...

Hey Aris, thanks for your reply. I got the similar issue here, but I'm only allowed to create managed notebooks instead of compute instances or user-managed notebooks. Is there a way to connect VS code with managed notebooks?

@nitya_r did you use any pipelines like tfx etc., or was your ingestion, preprocessing, training loop all in tf/keras?

Hello!

Please follow the instructions in the below link to setup Application Default Credentials (ADC) on your dev box. Code run within VScode will then use these credentials.

https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev

Thanks!