Fix Cloud Skills Boost Training Lab 531752 - Resolve Resource Location Constraint #2787
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Fixed notebook execution failures in the Vertex AI Model Monitoring lab due to Google Cloud organization policy constraints that restrict resource deployment to specific regions.
Problem
While working through the "Machine Learning in the Enterprise" course lab, encountered a
FailedPreconditionerror when uploading models to Vertex AI:Changes Made
aiplatform.init(project=PROJECT_ID, location=LOCATION)to ensure all Vertex AI operations use the correct project and region configurationprotobuf==3.20.3to pip install command to resolve version compatibility issuesTesting
✅ Verified model upload now succeeds when proper region (e.g.,
us-west1) is specified✅ Confirmed all subsequent model monitoring operations complete successfully
✅ Lab can now be completed end-to-end without resource constraint errors
This fix enables students to successfully complete the lab while adhering to the organization policies set in the Qwiklabs environment.