-
Notifications
You must be signed in to change notification settings - Fork 154
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
Add spot in runpod #1119
Add spot in runpod #1119
Conversation
@peterschmidt85 @TheBits I will update this PR to include resolved issues. #1133 |
64d0b16
to
2e32257
Compare
2e32257
to
3ab6f2b
Compare
Hi @Bihan! Functions @@ -1,4 +1,5 @@
-def generate_pod_deployment_mutation(
+def generate_pod_rent_interruptable_mutation(
+ bid_per_gpu: float,
name: str,
image_name: str,
gpu_type_id: str,
@@ -21,11 +22,12 @@
allowed_cuda_versions: Optional[List[str]] = None,
) -> str:
"""
- Generates a mutation to deploy a pod on demand.
+ Generates a mutation to deploy a pod spot.
"""
input_fields = []
# ------------------------------ Required Fields ----------------------------- #
+ input_fields.append(f"bidPerGpu: {bid_per_gpu}")
input_fields.append(f'name: "{name}"')
input_fields.append(f'imageName: "{image_name}"')
input_fields.append(f'gpuTypeId: "{gpu_type_id}"')
@@ -82,19 +84,16 @@
# Format input fields
input_string = ", ".join(input_fields)
-
return f"""
mutation {{
- podFindAndDeployOnDemand(
+ podRentInterruptable(
input: {{
{input_string}
}}
) {{
id
- desiredStatus
+ lastStatusChange
imageName
- env
- machineId
machine {{
podHostId
}} |
@TheBits I have pushed the changes. Thank you for the review. |
@Bihan Thank you! |
No description provided.