Setting up and running notebook environments in GCP requires balancing team collaboration with security controls. The two primary notebook services are Gemini Enterprise Agent Platform Workbench (formerly Vertex AI Workbench) and Colab Enterprise. Both are managed environments that run on Google Cloud infrastructure, but they differ in their intended use cases and security boundaries. Workbench is designed for data science and ML teams that need persistent, customizable instances with full access to GCP resources, while Colab Enterprise provides a lightweight, browser-based notebook that runs on a shared runtime and integrates with Vertex AI.
Collaboration best practices center on sharing notebooks without exposing sensitive data or credentials. Use Vertex AI Experiments to track runs and share results, and store notebooks in a Cloud Source Repository or Cloud Storage bucket that is accessible to the team. For security, apply Identity and Access Management (IAM) roles at the project or folder level to control who can create, modify, or delete notebook instances. Never embed service account keys or API tokens directly in a notebook; instead, use Vertex AI Custom Service Accounts attached to the notebook instance or use Secret Manager to retrieve secrets at runtime. Enable VPC Service Controls to prevent data exfiltration from the notebook environment to external networks, and use Cloud Audit Logs to monitor access and changes to notebooks.
Developing models in Gemini Enterprise Agent Platform Workbench or Colab Enterprise notebooks follows a similar workflow to local development but leverages managed infrastructure and pre-configured environments. Both services support popular ML frameworks such as PyTorch, scikit-learn (sklearn), and JAX. Workbench instances come with pre-installed deep learning frameworks and GPU drivers, and you can select a machine type with one or more GPUs (e.g., NVIDIA T4, V100, A100) when creating the instance. Colab Enterprise provides a managed runtime that automatically allocates CPU or GPU resources from a shared pool, and you can choose a runtime version that includes the frameworks you need.
The development process typically starts by importing data from Cloud Storage or BigQuery into the notebook, then using the chosen framework to build, train, and evaluate a model. For PyTorch, you can use torch.distributed for multi-GPU training; for sklearn, you can use Vertex AI Training to scale hyperparameter tuning; and for JAX, you can leverage XLA compilation for performance. After prototyping, you can package the model and deploy it to Vertex AI Endpoints directly from the notebook using the Vertex AI SDK. Both Workbench and Colab Enterprise support JupyterLab interfaces, so you can use the same code and workflow across environments.
Model Garden is a repository within Vertex AI that provides access to a wide range of foundational models and open-source models, including Gemini, PaLM 2, Claude, Llama 2, and Stable Diffusion, among others. In a notebook environment such as Gemini Enterprise Agent Platform Workbench or Colab Enterprise, you can browse Model Garden, select a model, and get a pre-written notebook template that demonstrates how to call the model's API or fine-tune it on your own data.
The workflow begins by opening Model Garden from the Vertex AI console or from within the notebook using the Vertex AI SDK. You can filter models by task (e.g., text generation, image generation, classification) and by license (open-source vs. proprietary). Once you select a model, you can either use it as-is via a managed API (for foundational models like Gemini) or download its weights and run it locally in the notebook (for open-source models like Llama 2). For prototyping, you typically start with a small sample of your data to test the model's output, then iterate on prompts or fine-tuning parameters. Model Garden also provides model cards that document the model's intended use, limitations, and training data, helping you make informed choices during prototyping.
Workbench is a persistent, customizable notebook instance that gives you full control over the machine type, GPUs, and installed packages, making it suitable for long-running development. Colab Enterprise is a lightweight, browser-based notebook with a shared runtime that starts quickly and is ideal for quick experiments and collaboration, but with less customization.
Select a model in Model Garden, then click "Open notebook" to get a pre-written notebook template that includes code to call the model's API using the Vertex AI SDK. You can then modify the notebook to use your own data or prompts.
Yes, Colab Enterprise supports PyTorch and other frameworks. You can choose a runtime version that includes PyTorch, and the runtime will allocate GPU resources if available. However, for large-scale distributed training, you may want to use Workbench with multiple GPUs or submit a training job to Vertex AI Training.
Professional Machine Learning Engineer
Prepare and test your skills
Prepare and test your skills