Skip to content

Commit

Permalink
Move assertion to start
Browse files Browse the repository at this point in the history
  • Loading branch information
iojw committed Dec 1, 2022
1 parent 6782ab5 commit 489aae1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sky/backends/backend_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1153,8 +1153,8 @@ def get_node_ips(cluster_yaml: str,
ray_config = common_utils.read_yaml(cluster_yaml)
use_tpu_vm = ray_config['provider'].get('_has_tpus', False)
if use_tpu_vm:
ips = _get_tpu_vm_pod_ips(ray_config, get_internal_ips)
assert expected_num_nodes == 1, 'TPU VM only supports single node for now.'
ips = _get_tpu_vm_pod_ips(ray_config, get_internal_ips)
if len(ips) != tpu_utils.get_num_tpu_devices(handle.launched_resources):
raise exceptions.FetchIPError(exceptions.FetchIPError.Reason.HEAD)
return ips
Expand Down

0 comments on commit 489aae1

Please sign in to comment.