-
Notifications
You must be signed in to change notification settings - Fork 470
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
[Azure] Support fractional A10 instance types #3877
base: master
Are you sure you want to change the base?
Changes from 11 commits
de35be4
39d6c15
7324504
347ad62
71af06e
d419442
f529689
2031a50
07e47d6
639c686
4c45ff7
84d6d0d
eca7033
0055fc1
9652119
a5c5b15
d2cff96
e8e9954
db607fa
e98ecdc
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 |
---|---|---|
@@ -1,12 +1,11 @@ | ||
"""Azure.""" | ||
import functools | ||
import json | ||
import os | ||
import re | ||
import subprocess | ||
import textwrap | ||
import typing | ||
from typing import Any, Dict, Iterator, List, Optional, Tuple | ||
from typing import Any, Dict, Iterator, List, Optional, Tuple, Union | ||
|
||
import colorama | ||
|
||
|
@@ -253,7 +252,7 @@ def zones_provision_loop( | |
def get_accelerators_from_instance_type( | ||
cls, | ||
instance_type: str, | ||
) -> Optional[Dict[str, int]]: | ||
) -> Optional[Dict[str, Union[int, float]]]: | ||
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. For the clouds that will not return 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. I tried and this is what I got: ./format.sh
SkyPilot Black:
All done! ✨ 🍰 ✨
4 files left unchanged.
SkyPilot yapf: Done
SkyPilot isort:
Skipped 5 files
SkyPilot mypy:
sky/clouds/aws.py:365: error: Return type "Optional[Dict[str, int]]" of "get_accelerators_from_instance_type" incompatible with return type "Optional[Dict[str, Union[int, float]]]" in supertype "Cloud" [override]
sky/clouds/aws.py:369: error: Incompatible return value type (got "Optional[Dict[str, Union[int, float]]]", expected "Optional[Dict[str, int]]") [return-value]
sky/clouds/aws.py:397: error: Argument 1 to "make_ray_custom_resources_str" has incompatible type "Optional[Dict[str, int]]"; expected "Optional[Dict[str, Union[int, float]]]" [arg-type]
Found 3 errors in 1 file (checked 225 source files) |
||
return service_catalog.get_accelerators_from_instance_type( | ||
instance_type, clouds='azure') | ||
|
||
|
@@ -285,7 +284,8 @@ def make_deploy_resources_variables( | |
acc_dict = self.get_accelerators_from_instance_type(r.instance_type) | ||
acc_count = None | ||
if acc_dict is not None: | ||
custom_resources = json.dumps(acc_dict, separators=(',', ':')) | ||
custom_resources = resources_utils.make_ray_custom_resources_str( | ||
acc_dict) | ||
acc_count = str(sum(acc_dict.values())) | ||
else: | ||
custom_resources = None | ||
|
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.
This error message is not accurate? Our check is for ACC count of existing cluster instead of the task requested resources?
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.
Please see the above comments 🤔