Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backend: add missing None check in _update_blocklist_on_gcp_error. #2852

Merged
merged 1 commit into from
Dec 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions sky/backends/cloud_vm_ray_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -772,9 +772,10 @@ def _update_blocklist_on_gcp_error(
launchable_resources.copy(region=None, zone=None))
elif ('SKYPILOT_ERROR_NO_NODES_LAUNCHED: No subnet for region '
in stderr):
if (any(acc.lower().startswith('tpu-v4')
for acc in launchable_resources.accelerators.keys()) and
region.name == 'us-central2'):
if (region.name == 'us-central2' and
launchable_resources.accelerators is not None and
any(acc.lower().startswith('tpu-v4')
for acc in launchable_resources.accelerators)):
# us-central2 is a TPU v4 only region. The subnet for
# this region may not exist when the user does not have
# the TPU v4 quota. We should skip this region.
Expand Down