Notebook Environment Integration and SDK-Based Experimentation describes the process of using managed notebook environments to quickly build and test machine learning applications. Developers use tools like Vertex AI Workbench and Colab Enterprise to write code that interacts with pre-trained models and agent frameworks. They rely on the Vertex AI SDK for Python to configure, package, and deploy these applications to scalable runtimes on Google Cloud.
Vertex AI Workbench and Colab Enterprise are managed services that provide interactive coding environments for prototyping. To start, a developer creates a new notebook instance in the Vertex AI Workbench console, waits for its status to become Ready, and then opens it. Once inside, they deploy the notebook to the server and restart the kernel to ensure a clean environment for running model tutorials and experiments. This creates an isolated workspace for testing foundational models.
Colab Enterprise connects notebooks to Google Cloud resources using secure authentication. When using end-user credentials, the process involves an OAuth consent flow, which requires that Google Workspace administrators have the Colab service enabled and that no enterprise restrictions block access. Developers can also enable AI-powered coding assistance, like the Help me code feature, directly within the Colab Enterprise editor settings to boost productivity.
The Vertex AI SDK for Python gives developers a programmatic way to build and deploy intelligent applications. They can construct agents by defining the base model, system instructions, and tools, and then package them using abstractions like AdkApp. For initial exploration, developers can use the visual Agent Designer or browse prebuilt solutions in Agent Garden before exporting their logic to code.
Deploying an application with the SDK involves specifying the project, location, and a v1beta1 API endpoint. The code packages the agent, uploads it to a designated Cloud Storage staging bucket, and registers it with the chosen runtime. Once deployed, the application can use managed memory features, such as short-term Sessions and long-term Memory Bank, to maintain state across user interactions.
Selecting a runtime for a deployed application depends on language needs, desired operational control, and infrastructure requirements. Vertex AI Agent Engine is a fully managed runtime for Python agents that handles scaling automatically using Cloud Run and requires minimal operational work. Cloud Run is a serverless platform for containerized applications that scales based on events and supports many programming languages. Google Kubernetes Engine (GKE) provides the most control, allowing for fine-tuned node configuration, use of specialized hardware accelerators, and enforcement of Kubernetes security policies, making it suitable for stateful, high-volume workloads.
Security for Vertex AI Agent Engine uses Agent Identity, a SPIFFE-standard identity that gets an auto-provisioned x509 certificate. This identity has a principal format like principal://TRUST_DOMAIN/NAMESPACE/AGENT_NAME. Administrators grant IAM permissions, such as roles/aiplatform.expressUser, directly to this principal. Monitoring integrates with Agent Engine Threat Detection, which requires enabling the Container Threat Detection API and having appropriate Security Command Center roles.
Model Discovery and Capability Evaluation in Model Garden is the practice of finding and testing machine learning models to identify the best fit for a given task. This process uses Vertex AI Model Garden, a catalog within Google Cloud that houses first-party Google models, third-party models, and open-source models. Data scientists perform evaluations inside notebook environments like Vertex AI Workbench to quickly prototype and validate a model's performance against specific business and technical goals.
Vertex AI Model Garden serves as the central library for discovering models. Users can browse and filter models by attributes such as modality (text, vision, audio), provider, licensing terms, and supported hardware. The catalog includes models like the open-source Gemma family and various Google models. To start evaluating, a user selects a model and can deploy it directly into a managed notebook instance. This direct integration from the catalog to the notebook streamlines the initial prototyping phase by automating model sourcing and environment setup.
Choosing the right model requires analyzing specific trade-offs and constraints listed for each model in Vertex AI Model Garden. Critical decision factors include the software license, which determines permissible commercial use; the modalities supported, which must align with the project's input and output data types; and the hardware constraints, which specify the necessary accelerators like GPUs or TPUs for efficient operation. Another key trade-off is between operational ease and control: a fully-managed runtime like Vertex AI Agent Engine reduces overhead, while a self-managed option like Google Kubernetes Engine (GKE) offers more infrastructure control and cost predictability for high-volume workloads, though it cannot host certain Google models like Gemini.
The final step in evaluation is building and testing a model prototype within a notebook environment like Vertex AI Workbench. Here, users write code to load the deployed model, run inference on sample data, and assess the outputs using metrics relevant to their use case. This hands-on testing validates practical aspects like latency, accuracy, and overall performance before committing to a full production deployment. The notebook is integrated with the broader Vertex AI ecosystem, allowing successful prototypes to be seamlessly transitioned into production pipelines.
Parameter-Efficient Tuning and Prototype Endpoint Deployment involves adapting large foundation models for specific tasks by updating only a small fraction of their parameters, then quickly deploying the tuned model for testing. Techniques like LoRA (Low-Rank Adaptation) and PEFT (Parameter-Efficient Fine-Tuning) enable this customization while keeping computational costs and training time low. These workflows are executed in managed notebook environments, such as Vertex AI Workbench, allowing for rapid iteration and validation before deploying the model to a serving endpoint for performance testing.
Vertex AI Workbench provides the computational environment for running fine-tuning experiments. A user starts by opening a notebook tutorial from the Workbench interface, creating and naming a new instance, and clicking Create. Once the instance is ready, they open it, confirm deployment to the notebook server, and restart the kernel to clear any previous outputs. This environment provides access to necessary hardware accelerators and model-serving software, enabling teams to prototype using their preferred frameworks on Google Cloud's managed infrastructure.
After validating a model in the notebook, the next step is deploying it to a Vertex AI Endpoint to measure real-world latency and performance. Vertex AI Agent Engine is a fully-managed runtime designed for deploying and scaling agentic applications; it uses Cloud Run's autoscaling so developers don't need to manage infrastructure. For model serving with more control, teams can use Google Kubernetes Engine (GKE), which allows fine-grained configuration of nodes, use of specialized accelerators, and enforcement of strict Kubernetes security policies. GKE's cost model is based on underlying compute resources, making it cost-effective for predictable, high-volume workloads, especially with committed use discounts.
The choice between deployment targets hinges on operational needs and existing infrastructure. Use Vertex AI Agent Engine for Python agents that require a fully-managed experience with built-in memory and integrated observability. Use Cloud Run for containerized applications that need serverless, event-driven scaling and language flexibility. Choose GKE for applications with complex, stateful requirements, those needing the highest level of security and data isolation, or when the team already manages workloads on Kubernetes. Leveraging an existing platform (Cloud Run or GKE) can accelerate development.
Vertex AI Agent Engine is a fully-managed, opinionated runtime for Python agents that automatically scales and requires minimal operational overhead. Google Kubernetes Engine (GKE) is a self-managed Kubernetes service that provides fine-grained control over node configuration, hardware accelerators, and security policies, making it suitable for complex, stateful, or high-volume workloads.
Use parameter-efficient fine-tuning (PEFT) techniques like LoRA when you need to adapt a large foundation model to a specific domain or task quickly and with limited computational resources. Choose full model training when you have a very large, unique dataset and the performance gains justify the significantly higher cost and time investment.
Choose a model by evaluating its trade-offs and constraints as listed in the catalog. Key criteria include the model's licensing terms for commercial use, its supported modalities (text, vision, etc.) matching your data, its hardware requirements (GPU/TPU), and the operational trade-off between using a fully-managed runtime versus a self-managed one like GKE for deployment.
Professional Machine Learning Engineer
Prepare and test your skills
Prepare and test your skills