-
Notifications
You must be signed in to change notification settings - Fork 554
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
[Spot] Refactor spot APIs into spot.xxx
#3417
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! It mostly looks great to me except for some minor suggestions and a bug when calling sky.start
instead of sky/core.py::_start
; please reference to the comment above ;)
""".strip() | ||
|
||
|
||
def convert_entrypoint_to_dag(entrypoint: Any) -> 'dag_lib.Dag': |
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.
code gardening: should we add proper type annotation for entrypoint
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.
For entrypoint, we check all the other types in the function below. It might be fine for now?
Co-authored-by: Tian Xia <[email protected]>
Tested:
|
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! Looks great to me.
@@ -626,3 +626,20 @@ def fill_template(template_name: str, variables: Dict, | |||
content = j2_template.render(**variables) | |||
with open(output_path, 'w', encoding='utf-8') as fout: | |||
fout.write(content) | |||
|
|||
|
|||
def deprecated_function(func: Callable, name: str, deprecated_name: 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.
is there other deprecated function in the system? if so, change to this decorator as well?
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.
No, I don't think there is any other deprecated functions in the system.
This PR refactors spot APIs
core.spot_xxx
intospot.xxx
.Closes #3283
Blocking #3419
Tested (run the relevant ones):
bash format.sh
pytest tests/test_smoke.py
(except test_spot_tpu, test_tpu_vm_pod, and tpu_vm_app due to [Examples] TPU example failexamples/tpu/tpuvm_mnist.yaml
#3425)pytest tests/test_smoke.py::test_fill_in_the_name
bash tests/backward_comaptibility_tests.sh