Collaborating within and across teams to manage data and models · Topic 3 of 4

Prototyping in Workbench and Colab Enterprise

Choose Agent Platform Workbench or Colab Enterprise, secure and share notebooks, build PyTorch, scikit-learn or JAX models and prototype with Model Garden.

  • 5 min
In a nutshell
  • Workbench: configurable JupyterLab VM; Colab Enterprise: managed, low-setup Colab runtimes.
  • Use service accounts with least privilege, no public IP, VPC Service Controls and Secret Manager.
  • Keep notebook code in Git; move reusable code out of notebooks for production.

What it is

Notebooks are where most models start. Google Cloud offers two managed notebook environments: Gemini Enterprise Agent Platform Workbench (JupyterLab on a VM instance you configure) and Colab Enterprise (the Colab experience with managed runtimes, inside your Google Cloud project).

The exam tests which one to choose, how to keep notebooks secure and shareable, and how to prototype with common frameworks and Model Garden models.

NotebookWorkbench or Colab EnterpriseLoad dataBigQuery or Cloud StoragePrototypePyTorch, sklearn, JAXTry modelsModel GardenHand offcode in Git

How it works

Choosing the environment

Agent Platform WorkbenchColab Enterprise
What it isA JupyterLab instance on a Compute Engine VMManaged Colab notebooks with on-demand runtimes
SetupYou choose machine type, GPUs, disk, network and imageRuntimes come from runtime templates (a default one or one an admin defines)
ControlFull: install system packages, use custom containers, JupyterLab extensionsLess to manage; focus on the notebook
CollaborationGit integration in JupyterLab; share the instance with a user or service accountNotebooks shared through IAM, like other project resources
Best forLong-running, customized, GPU-heavy developmentQuick, low-setup exploration and sharing, often started from BigQuery

Both connect to BigQuery and Cloud Storage and can attach GPUs.

Collaboration and security best practices

PracticeWhy
Keep notebook code in Git and move reusable logic into Python modulesReviews, history, and a clean path to pipelines
Run notebooks as a dedicated service account with only needed roles, or in single-user modeLeast privilege and clear audit trails
Turn off public IP, use a private VPC network and VPC Service ControlsStops data leaving through the notebook
Use CMEK where policy requires itCustomer control of encryption keys
Store secrets in Secret Manager, never in cellsNotebooks get shared and committed
Enable idle shutdownStops paying for unused VMs and GPUs
Use runtime templates or standard imagesEveryone gets the same versions and settings
Clear outputs containing data before sharingOutputs can leak sensitive rows
Exam tip

"Prevent data scientists from copying training data out of the project through notebooks" points to VPC Service Controls plus notebooks with no public IP, not to a policy document.

Developing models with common frameworks

Both environments come with the popular frameworks: PyTorch, scikit-learn, TensorFlow, XGBoost and JAX.

FrameworkTypical prototype
scikit-learn, XGBoostTabular models on data that fits in memory
PyTorchDeep learning for images, text and custom architectures
JAXHigh-performance research code, often on TPUs
from google.cloud import bigquery
from sklearn.ensemble import RandomForestClassifier
from sklearn.model_selection import train_test_split
from sklearn.metrics import roc_auc_score

df = bigquery.Client().query(
    "SELECT * FROM retail.customer_features").to_dataframe()
X = df.drop(columns=["customer_id", "churned"]).select_dtypes("number")
y = df["churned"]
X_tr, X_te, y_tr, y_te = train_test_split(X, y, test_size=0.2, stratify=y)
clf = RandomForestClassifier(n_estimators=300).fit(X_tr, y_tr)
print(roc_auc_score(y_te, clf.predict_proba(X_te)[:, 1]))

When the prototype works, the same training code moves into a custom training job or pipeline component instead of running from the notebook.

Prototyping with Model Garden

  • Gemini and other managed models: call them from the notebook with the SDK; no deployment needed.
  • Open models (for example Gemma): open the model card's example notebook, deploy the model to an endpoint, then send test prompts.
  • Compare candidates on the same small evaluation set before choosing one for production.

Delete or undeploy test endpoints when the prototype ends; deployed models bill for their nodes while they exist.

A worked example

A team of five data scientists shares one notebook VM with a personal key file uploaded to it. Results differ between people and nobody knows which code produced the best model.

The engineer gives each person a Workbench instance with no public IP, running as a service account with read access to the training dataset only. Code lives in Git, secrets move to Secret Manager, and idle shutdown is enabled. Quick SQL-driven exploration moves to Colab Enterprise.

Shared VMkey fileWorkbench per userservice accountCode in GitSecretsSecret ManagerIdle shutdown

How the exam asks about this

  • "Analysts want to start notebooks with minimal setup and share them through IAM." Colab Enterprise with runtime templates.
  • "A researcher needs custom system libraries and a specific GPU for weeks of development." An Agent Platform Workbench instance.
  • "Notebook VMs keep running all weekend." Enable idle shutdown on the instances.

What to remember for the exam

  • Workbench: configurable JupyterLab VM; Colab Enterprise: managed, low-setup Colab runtimes.
  • Use service accounts with least privilege, no public IP, VPC Service Controls and Secret Manager.
  • Keep notebook code in Git; move reusable code out of notebooks for production.
  • PyTorch, scikit-learn, TensorFlow, XGBoost and JAX are available in both.
  • Model Garden models can be called or deployed from notebooks; clean up test endpoints.
Watch out

Notebooks are prototypes, not production. A model trained by running cells by hand is not reproducible; production training belongs in jobs and pipelines.

Common mistakes

Uploading service account keys to notebooks. Use the instance's attached service account instead; keys leak.

Sharing one notebook VM across a team. It mixes environments, permissions and costs; give each user an instance or use Colab Enterprise.

Leaving prototype endpoints deployed. They keep billing for compute after the experiment ends.

Check yourself

  • When is Colab Enterprise a better fit than Workbench?

    When users want low-setup notebooks with managed runtimes and IAM-based sharing, rather than a VM they configure themselves.

  • How should a notebook authenticate to BigQuery?

    Through the instance's attached service account with least-privilege roles, not an uploaded key file.

  • What stops notebooks being used to copy data out of the project?

    Running them without public IP inside a VPC Service Controls perimeter that restricts access to the data services.

Topic 3 of 4 in Collaborating within and across teams to manage data and models

Test yourself on Collaborating within and across teams to manage data and models

The full Google Cloud Professional Machine Learning Engineer question bank has 749 questions, with timed practice exams and an explanation for every answer.

This study guide is independent and is not affiliated with, endorsed by, or sponsored by Google Cloud. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.