Skip to content

Commit ded7d4d

Browse files
authored
fix: keep allowed_cuda_versions as string (#421)
* fix: keep `allowed_cuda_versions` as string * fix: do not include when empty or null
1 parent e42ea02 commit ded7d4d

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

runpod/api/ctl_commands.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ def create_endpoint(
316316
workers_min: int = 0,
317317
workers_max: int = 3,
318318
flashboot=False,
319-
allowed_cuda_versions: list = None,
319+
allowed_cuda_versions: str = None,
320320
gpu_count: int = 1,
321321
):
322322
"""

runpod/api/mutations/endpoints.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def generate_endpoint_mutation(
1515
workers_min: int = 0,
1616
workers_max: int = 3,
1717
flashboot=False,
18-
allowed_cuda_versions: list = None,
18+
allowed_cuda_versions: str = None,
1919
gpu_count: int = None,
2020
):
2121
"""Generate a string for a GraphQL mutation to create a new endpoint."""
@@ -47,8 +47,7 @@ def generate_endpoint_mutation(
4747
input_fields.append(f"workersMax: {workers_max}")
4848

4949
if allowed_cuda_versions:
50-
cuda_versions = ", ".join(f'"{v}"' for v in allowed_cuda_versions)
51-
input_fields.append(f"allowedCudaVersions: [{cuda_versions}]")
50+
input_fields.append(f"allowedCudaVersions: {allowed_cuda_versions}")
5251

5352
if gpu_count is not None:
5453
input_fields.append(f"gpuCount: {gpu_count}")

0 commit comments

Comments
 (0)