-
Notifications
You must be signed in to change notification settings - Fork 485
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
Show DEVICE_MEMORY in show-gpus
for AWS & Lambda.
#1825
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2938,8 +2938,16 @@ def show_gpus( | |
To show all accelerators, including less common ones and their detailed | ||
information, use ``sky show-gpus --all``. | ||
|
||
NOTE: If region is not specified, the price displayed for each instance type | ||
is the lowest across all regions for both on-demand and spot instances. | ||
Definitions of certain fields: | ||
|
||
* ``DEVICE_MEM``: Memory of a single device; does not depend on the device | ||
count of the instance (VM). | ||
|
||
* ``HOST_MEM``: Memory of the host instance (VM). | ||
|
||
If ``--region`` is not specified, the price displayed for each instance | ||
type is the lowest across all regions for both on-demand and spot | ||
instances. There may be multiple regions with the same lowest price. | ||
""" | ||
# validation for the --region flag | ||
if region is not None and cloud is None: | ||
|
@@ -3012,8 +3020,9 @@ def _output(): | |
'QTY', | ||
'CLOUD', | ||
'INSTANCE_TYPE', | ||
'DEVICE_MEM', | ||
'vCPUs', | ||
'HOST_MEMORY', | ||
'HOST_MEM', | ||
'HOURLY_PRICE', | ||
'HOURLY_SPOT_PRICE', | ||
] | ||
|
@@ -3032,7 +3041,9 @@ def _output(): | |
cpu_str = str(int(cpu_count)) | ||
else: | ||
cpu_str = f'{cpu_count:.1f}' | ||
mem_str = f'{item.memory:.0f}GB' if not pd.isna( | ||
device_memory_str = (f'{item.device_memory:.0f}GB' if | ||
not pd.isna(item.device_memory) else '-') | ||
Comment on lines
+3044
to
+3045
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is the definition of device memory? IIRC, it is the amount of memory in a single device and does not depend on the device count, right? Then what about TPUs? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added some definition to |
||
host_memory_str = f'{item.memory:.0f}GB' if not pd.isna( | ||
item.memory) else '-' | ||
price_str = f'$ {item.price:.3f}' if not pd.isna( | ||
item.price) else '-' | ||
|
@@ -3044,8 +3055,9 @@ def _output(): | |
item.accelerator_count, | ||
item.cloud, | ||
instance_type_str, | ||
device_memory_str, | ||
cpu_str, | ||
mem_str, | ||
host_memory_str, | ||
price_str, | ||
spot_price_str, | ||
] | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Do we need `` here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, this doesn't look good on
-h
but is what's needed for rst/sphinx docs.