Alex
Alex
RRunPod
Created by Alex on 1/15/2024 in #⛅|pods
GPUs look available via `runpod.api.ctl_commands.get_gpu()` which aren't available.
I'm currently trying to find which types of GPUs are available (in order to programatically decide what GPU type I want). I saw that there is a runpod.api.ctl_commands.get_gpu() function which calls the graphql api, but the information it returns seems inconsistent with what's available. For example, right now. I can run
>>> pprint(runpod.api.ctl_commands.get_gpu("NVIDIA RTX 4000 Ada Generation"))
{'communityCloud': True,
'communityPrice': 0.21,
'communitySpotPrice': 0.15,
'cudaCores': 0,
'displayName': 'RTX 4000 Ada',
'id': 'NVIDIA RTX 4000 Ada Generation',
'lowestPrice': {'minimumBidPrice': 0.15, 'uninterruptablePrice': 0.21},
'manufacturer': 'Nvidia',
'maxGpuCount': 5,
'memoryInGb': 20,
'oneMonthPrice': 0.34,
'oneWeekPrice': None,
'secureCloud': True,
'securePrice': 0.39,
'secureSpotPrice': None,
'threeMonthPrice': 0.29}
>>> pprint(runpod.api.ctl_commands.get_gpu("NVIDIA RTX 4000 Ada Generation"))
{'communityCloud': True,
'communityPrice': 0.21,
'communitySpotPrice': 0.15,
'cudaCores': 0,
'displayName': 'RTX 4000 Ada',
'id': 'NVIDIA RTX 4000 Ada Generation',
'lowestPrice': {'minimumBidPrice': 0.15, 'uninterruptablePrice': 0.21},
'manufacturer': 'Nvidia',
'maxGpuCount': 5,
'memoryInGb': 20,
'oneMonthPrice': 0.34,
'oneWeekPrice': None,
'secureCloud': True,
'securePrice': 0.39,
'secureSpotPrice': None,
'threeMonthPrice': 0.29}
Here the instances looks available. But if I try to launch the instance immediately after, I see
>>> runpod.api.ctl_commands.create_pod("Alex-test", "ubuntu:lastest", "NVIDIA RTX 4000 Ada Generation", cloud_type="COMMUNITY")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/alex/miniconda3/lib/python3.11/site-packages/runpod/api/ctl_commands.py", line 129, in create_pod
raw_response = run_graphql_query(
^^^^^^^^^^^^^^^^^^
File "/home/alex/miniconda3/lib/python3.11/site-packages/runpod/api/graphql.py", line 30, in run_graphql_query
raise error.QueryError(
runpod.error.QueryError: There are no longer any instances available with the requested specifications. Please refresh and try again.
>>> runpod.api.ctl_commands.create_pod("Alex-test", "ubuntu:lastest", "NVIDIA RTX 4000 Ada Generation", cloud_type="COMMUNITY")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/alex/miniconda3/lib/python3.11/site-packages/runpod/api/ctl_commands.py", line 129, in create_pod
raw_response = run_graphql_query(
^^^^^^^^^^^^^^^^^^
File "/home/alex/miniconda3/lib/python3.11/site-packages/runpod/api/graphql.py", line 30, in run_graphql_query
raise error.QueryError(
runpod.error.QueryError: There are no longer any instances available with the requested specifications. Please refresh and try again.
This is pretty consistent, so it doesn't feel like I'm just getting "unlucky". I should also note that the GPU is (correctly) marked as "Unavailable" on the dashboard. Is there a way for me to query data/get the same results as the data on the dasbhoard?
1 replies