Share a reproducible notebook
Separate notebook access, runtime dependencies and the identity that reads training data.
Share a reproducible notebook
Work through the decision
Two analysts open the same notebook. One cannot read the training table and the other imports a different framework version. What must be made reproducible?
Check your reasoning
Write down which principal runs the code and grant its service account the minimum access to the approved dataset. Check network reachability separately. Pin the runtime image, framework versions and accelerator requirements. Restart with a fresh kernel and run all cells before sharing the result.
Compare the choices
- Execution identity
- Audit the service account used by the runtime. Grant narrow permissions on required data and endpoints and control who can act as that identity.
- Pinned runtime
- Record the image, framework and dependency versions, then replay from a clean kernel. A saved output cell does not establish reproducibility.
- Private connectivity
- Constrain runtime network paths and configure access to required Google APIs or private endpoints. IAM and connectivity are separate checks.
- Matched prototype inputs
- Compare hosted and self-deployed candidates on the same representative prompts, output rubric and latency measurements.
Test the decision
In Workbench or Colab Enterprise, workspace sharing and the execution identity have different effects. Test with a second analyst using their intended permissions. Prototype a hosted Gemini call and a Model Garden candidate with the same evaluation inputs and record the serving mode each requires.
Practice the guide skills
- List notebook authors, runtime service accounts, dataset permissions and network paths separately. Test read access under the identity the code uses. Watch 44:32
- Pin a runtime image, Python framework version and accelerator requirement, restart a clean notebook and rerun the model prototype. Watch 43:09
- Run the same input set through a hosted Gemini prototype and a compatible open Model Garden model. Record cost, latency, output and deployment assumptions. Watch 45:49
Official objectives for this lesson
Related lesson · Separate the right to run a query from the right to read data
Share a reproducible notebook quiz
Answer 3 questions. Check each answer for an explanation.