File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -107,6 +107,8 @@ def create_pod(
107107 template_id : Optional [str ] = None ,
108108 network_volume_id : Optional [str ] = None ,
109109 allowed_cuda_versions : Optional [list ] = None ,
110+ min_download = None ,
111+ min_upload = None ,
110112) -> dict :
111113 """
112114 Create a pod
@@ -125,7 +127,8 @@ def create_pod(
125127 for example {EXAMPLE_VAR:"example_value", EXAMPLE_VAR2:"example_value 2"}, will
126128 inject EXAMPLE_VAR and EXAMPLE_VAR2 into the pod with the mentioned values
127129 :param template_id: the id of the template to use for the pod
128-
130+ :param min_download: minimum download speed in Mbps
131+ :param min_upload: minimum upload speed in Mbps
129132 :example:
130133
131134 >>> pod_id = runpod.create_pod("test", "runpod/stack", "NVIDIA GeForce RTX 3070")
@@ -167,6 +170,8 @@ def create_pod(
167170 template_id ,
168171 network_volume_id ,
169172 allowed_cuda_versions ,
173+ min_download ,
174+ min_upload ,
170175 )
171176 )
172177
Original file line number Diff line number Diff line change @@ -28,6 +28,8 @@ def generate_pod_deployment_mutation(
2828 template_id = None ,
2929 network_volume_id = None ,
3030 allowed_cuda_versions : Optional [List [str ]] = None ,
31+ min_download = None ,
32+ min_upload = None ,
3133):
3234 """
3335 Generates a mutation to deploy a pod on demand.
@@ -89,9 +91,14 @@ def generate_pod_deployment_mutation(
8991 )
9092 input_fields .append (f"allowedCudaVersions: [{ allowed_cuda_versions_string } ]" )
9193
94+ if min_download is not None :
95+ input_fields .append (f'minDownload: { min_download } ' )
96+
97+ if min_upload is not None :
98+ input_fields .append (f'minUpload: { min_upload } ' )
99+
92100 # Format input fields
93101 input_string = ", " .join (input_fields )
94-
95102 return f"""
96103 mutation {{
97104 podFindAndDeployOnDemand(
You can’t perform that action at this time.
0 commit comments