-
Notifications
You must be signed in to change notification settings - Fork 532
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
[Catalog] Fix lambda fetcher #3801
Conversation
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.
Thanks for the fix! LGTM.
@@ -71,24 +73,32 @@ def create_catalog(api_key: str, output_path: str) -> None: | |||
# We parse info.keys() in reverse order so gpu_1x_a100_sxm4 comes before | |||
# gpu_1x_a100 in the catalog (gpu_1x_a100_sxm4 has more availability). | |||
for vm in reversed(list(info.keys())): | |||
gpu = name_to_gpu(vm) | |||
gpu_cnt = float(name_to_gpu_cnt(vm)) |
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.
The name_to_gpu_cnt
function is not used and safe to delete?
} | ||
|
||
|
||
def name_to_gpu(name: str) -> str: | ||
def name_to_gpu_and_cnt(name: str) -> Optional[Tuple[str, int]]: |
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.
could we add a comment for the expected format of the name?
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.
Added. Thanks!
Lambda recently added CPU instance type which causes our catalog fetcher fail. This PR fixes this.
Tested (run the relevant ones):
bash format.sh
python -m sky.clouds.service_catalog.data_fetchers.fetch_lambda_cloud
pytest tests/test_smoke.py
pytest tests/test_smoke.py::test_fill_in_the_name
conda deactivate; bash -i tests/backward_compatibility_tests.sh