@@ -772,6 +772,7 @@ def deploy(
772
772
max_replica_count : int = 1 ,
773
773
accelerator_type : Optional [str ] = None ,
774
774
accelerator_count : Optional [int ] = None ,
775
+ tpu_topology : Optional [str ] = None ,
775
776
service_account : Optional [str ] = None ,
776
777
explanation_metadata : Optional [aiplatform .explain .ExplanationMetadata ] = None ,
777
778
explanation_parameters : Optional [
@@ -833,6 +834,9 @@ def deploy(
833
834
NVIDIA_TESLA_V100, NVIDIA_TESLA_P4, NVIDIA_TESLA_T4
834
835
accelerator_count (int):
835
836
Optional. The number of accelerators to attach to a worker replica.
837
+ tpu_topology (str):
838
+ Optional. The TPU topology to use for the DeployedModel.
839
+ Required for CloudTPU multihost deployments.
836
840
service_account (str):
837
841
The service account that the DeployedModel's container runs as. Specify the
838
842
email address of the service account. If this service account is not
@@ -896,6 +900,7 @@ def deploy(
896
900
max_replica_count = max_replica_count ,
897
901
accelerator_type = accelerator_type ,
898
902
accelerator_count = accelerator_count ,
903
+ tpu_topology = tpu_topology ,
899
904
service_account = service_account ,
900
905
explanation_spec = explanation_spec ,
901
906
metadata = metadata ,
@@ -919,6 +924,7 @@ def _deploy(
919
924
max_replica_count : int = 1 ,
920
925
accelerator_type : Optional [str ] = None ,
921
926
accelerator_count : Optional [int ] = None ,
927
+ tpu_topology : Optional [str ] = None ,
922
928
service_account : Optional [str ] = None ,
923
929
explanation_spec : Optional [aiplatform .explain .ExplanationSpec ] = None ,
924
930
metadata : Optional [Sequence [Tuple [str , str ]]] = (),
@@ -977,6 +983,9 @@ def _deploy(
977
983
NVIDIA_TESLA_V100, NVIDIA_TESLA_P4, NVIDIA_TESLA_T4
978
984
accelerator_count (int):
979
985
Optional. The number of accelerators to attach to a worker replica.
986
+ tpu_topology (str):
987
+ Optional. The TPU topology to use for the DeployedModel.
988
+ Required for CloudTPU multihost deployments.
980
989
service_account (str):
981
990
The service account that the DeployedModel's container runs as. Specify the
982
991
email address of the service account. If this service account is not
@@ -1026,6 +1035,7 @@ def _deploy(
1026
1035
max_replica_count = max_replica_count ,
1027
1036
accelerator_type = accelerator_type ,
1028
1037
accelerator_count = accelerator_count ,
1038
+ tpu_topology = tpu_topology ,
1029
1039
service_account = service_account ,
1030
1040
explanation_spec = explanation_spec ,
1031
1041
metadata = metadata ,
@@ -1056,6 +1066,7 @@ def _deploy_call(
1056
1066
max_replica_count : int = 1 ,
1057
1067
accelerator_type : Optional [str ] = None ,
1058
1068
accelerator_count : Optional [int ] = None ,
1069
+ tpu_topology : Optional [str ] = None ,
1059
1070
service_account : Optional [str ] = None ,
1060
1071
explanation_spec : Optional [aiplatform .explain .ExplanationSpec ] = None ,
1061
1072
metadata : Optional [Sequence [Tuple [str , str ]]] = (),
@@ -1123,6 +1134,9 @@ def _deploy_call(
1123
1134
NVIDIA_TESLA_V100, NVIDIA_TESLA_P4, NVIDIA_TESLA_T4
1124
1135
accelerator_count (int):
1125
1136
Optional. The number of accelerators to attach to a worker replica.
1137
+ tpu_topology (str):
1138
+ Optional. The TPU topology to use for the DeployedModel.
1139
+ Required for CloudTPU multihost deployments.
1126
1140
service_account (str):
1127
1141
The service account that the DeployedModel's container runs as. Specify the
1128
1142
email address of the service account. If this service account is not
@@ -1250,6 +1264,9 @@ def _deploy_call(
1250
1264
[autoscaling_metric_spec ]
1251
1265
)
1252
1266
1267
+ if tpu_topology is not None :
1268
+ machine_spec .tpu_topology = tpu_topology
1269
+
1253
1270
dedicated_resources .machine_spec = machine_spec
1254
1271
deployed_model .dedicated_resources = dedicated_resources
1255
1272
@@ -2440,6 +2457,7 @@ def deploy(
2440
2457
max_replica_count : int = 1 ,
2441
2458
accelerator_type : Optional [str ] = None ,
2442
2459
accelerator_count : Optional [int ] = None ,
2460
+ tpu_topology : Optional [str ] = None ,
2443
2461
service_account : Optional [str ] = None ,
2444
2462
explanation_metadata : Optional [aiplatform .explain .ExplanationMetadata ] = None ,
2445
2463
explanation_parameters : Optional [
@@ -2487,6 +2505,9 @@ def deploy(
2487
2505
NVIDIA_TESLA_V100, NVIDIA_TESLA_P4, NVIDIA_TESLA_T4
2488
2506
accelerator_count (int):
2489
2507
Optional. The number of accelerators to attach to a worker replica.
2508
+ tpu_topology (str):
2509
+ Optional. The TPU topology to use for the DeployedModel.
2510
+ Required for CloudTPU multihost deployments.
2490
2511
service_account (str):
2491
2512
The service account that the DeployedModel's container runs as. Specify the
2492
2513
email address of the service account. If this service account is not
@@ -2534,6 +2555,7 @@ def deploy(
2534
2555
max_replica_count = max_replica_count ,
2535
2556
accelerator_type = accelerator_type ,
2536
2557
accelerator_count = accelerator_count ,
2558
+ tpu_topology = tpu_topology ,
2537
2559
service_account = service_account ,
2538
2560
explanation_spec = explanation_spec ,
2539
2561
metadata = metadata ,
@@ -3442,6 +3464,7 @@ def deploy(
3442
3464
max_replica_count : int = 1 ,
3443
3465
accelerator_type : Optional [str ] = None ,
3444
3466
accelerator_count : Optional [int ] = None ,
3467
+ tpu_topology : Optional [str ] = None ,
3445
3468
service_account : Optional [str ] = None ,
3446
3469
explanation_metadata : Optional [aiplatform .explain .ExplanationMetadata ] = None ,
3447
3470
explanation_parameters : Optional [
@@ -3505,6 +3528,9 @@ def deploy(
3505
3528
NVIDIA_TESLA_V100, NVIDIA_TESLA_P4, NVIDIA_TESLA_T4
3506
3529
accelerator_count (int):
3507
3530
Optional. The number of accelerators to attach to a worker replica.
3531
+ tpu_topology (str):
3532
+ Optional. The TPU topology to use for the DeployedModel.
3533
+ Requireid for CloudTPU multihost deployments.
3508
3534
service_account (str):
3509
3535
The service account that the DeployedModel's container runs as. Specify the
3510
3536
email address of the service account. If this service account is not
@@ -3601,6 +3627,7 @@ def deploy(
3601
3627
max_replica_count = max_replica_count ,
3602
3628
accelerator_type = accelerator_type ,
3603
3629
accelerator_count = accelerator_count ,
3630
+ tpu_topology = tpu_topology ,
3604
3631
service_account = service_account ,
3605
3632
explanation_spec = explanation_spec ,
3606
3633
metadata = metadata ,
@@ -3627,6 +3654,7 @@ def _deploy(
3627
3654
max_replica_count : int = 1 ,
3628
3655
accelerator_type : Optional [str ] = None ,
3629
3656
accelerator_count : Optional [int ] = None ,
3657
+ tpu_topology : Optional [str ] = None ,
3630
3658
service_account : Optional [str ] = None ,
3631
3659
explanation_spec : Optional [aiplatform .explain .ExplanationSpec ] = None ,
3632
3660
metadata : Optional [Sequence [Tuple [str , str ]]] = (),
@@ -3687,6 +3715,9 @@ def _deploy(
3687
3715
NVIDIA_TESLA_V100, NVIDIA_TESLA_P4, NVIDIA_TESLA_T4
3688
3716
accelerator_count (int):
3689
3717
Optional. The number of accelerators to attach to a worker replica.
3718
+ tpu_topology (str):
3719
+ Optional. The TPU topology to use for the DeployedModel.
3720
+ Requireid for CloudTPU multihost deployments.
3690
3721
service_account (str):
3691
3722
The service account that the DeployedModel's container runs as. Specify the
3692
3723
email address of the service account. If this service account is not
@@ -3777,6 +3808,7 @@ def _deploy(
3777
3808
max_replica_count = max_replica_count ,
3778
3809
accelerator_type = accelerator_type ,
3779
3810
accelerator_count = accelerator_count ,
3811
+ tpu_topology = tpu_topology ,
3780
3812
service_account = service_account ,
3781
3813
explanation_spec = explanation_spec ,
3782
3814
metadata = metadata ,
0 commit comments