-
Notifications
You must be signed in to change notification settings - Fork 529
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Azure] Support fractional A10 instance types (#3877)
* fix * change catalog to float gpu num * support print float point gpu in sky launch. TODO: test if the ray deployment group works for fractional one * fix unittest * format * patch ray resources to ceil value * support launch from --gpus A10 * only allow strictly match fractional gpu counts * address comment * change back condition * fix * apply suggestions from code review * fix * Update sky/backends/cloud_vm_ray_backend.py Co-authored-by: Zhanghao Wu <[email protected]> * format * fix display of fuzzy candidates * fix precision issue * fix num gpu required * refactor in check_resources_fit_cluster * change type annotation of acc_count * enable fuzzy fp acc count * fix k8s * Update sky/clouds/service_catalog/common.py Co-authored-by: Zhanghao Wu <[email protected]> * fix integer gpus * format --------- Co-authored-by: Zhanghao Wu <[email protected]>
- Loading branch information
1 parent
0e915d3
commit 647fcea
Showing
31 changed files
with
150 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,11 +20,10 @@ | |
- Hysun He ([email protected]) @ Oct 13, 2024: | ||
Support more OS types additional to ubuntu for OCI resources. | ||
""" | ||
import json | ||
import logging | ||
import os | ||
import typing | ||
from typing import Dict, Iterator, List, Optional, Tuple | ||
from typing import Dict, Iterator, List, Optional, Tuple, Union | ||
|
||
from sky import clouds | ||
from sky import exceptions | ||
|
@@ -193,7 +192,7 @@ def get_default_instance_type( | |
def get_accelerators_from_instance_type( | ||
cls, | ||
instance_type: str, | ||
) -> Optional[Dict[str, int]]: | ||
) -> Optional[Dict[str, Union[int, float]]]: | ||
return service_catalog.get_accelerators_from_instance_type( | ||
instance_type, clouds='oci') | ||
|
||
|
@@ -213,10 +212,8 @@ def make_deploy_resources_variables( | |
|
||
acc_dict = self.get_accelerators_from_instance_type( | ||
resources.instance_type) | ||
if acc_dict is not None: | ||
custom_resources = json.dumps(acc_dict, separators=(',', ':')) | ||
else: | ||
custom_resources = None | ||
custom_resources = resources_utils.make_ray_custom_resources_str( | ||
acc_dict) | ||
|
||
image_str = self._get_image_id(resources.image_id, region.name, | ||
resources.instance_type) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.