skypilot-users

Parsing output of 'sky show-gpus --all >>out.txt' to a dataframe

Ta

Tanushree Sharma

Asked on Oct 10, 2023

Yes, you can parse the output of 'sky show-gpus --all >>out.txt' to a dataframe. One way to do this is by directly dealing with the CSV files in the ~/.sky/catalogs directory. Alternatively, you can use the service catalog python API provided by Skypilot to query the CSV files. Here's an example:

import sky

sky.clouds.service_catalog.get_accelerator_hourly_cost(acc_name='A100', acc_count=4, use_spot=False, clouds='gcp')
Oct 11, 2023Edited by