-
Notifications
You must be signed in to change notification settings - Fork 547
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
CLI: Deprecate cpunode/gpunode/tpunode
, hide admin
#2800
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 deprecating the commands @concretevitamin! LGTM.
@@ -48,7 +50,7 @@ More details can be found on GCP `documentation <https://cloud.google.com/tpu/do | |||
TPU VMs | |||
------- | |||
|
|||
To use TPU VMs, set the following in a task YAML's ``resources`` field: | |||
To use TPU VMs, set the following in a task YAML's ``resources`` field: |
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.
nit: in the future, we probably need to add the --tpu-vm
for sky launch
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.
Or we can switch the default from tpu nodes to tpu vms @infwinston
Co-authored-by: Zhanghao Wu <[email protected]>
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 @concretevitamin!
def _deprecate_and_hide_command(group, command_to_deprecate, | ||
alternative_command): | ||
"""Hide a command and show a deprecation note, hinting the alternative.""" | ||
command_to_deprecate.hidden = True | ||
if group is not None: | ||
orig = f'sky {group.name} {command_to_deprecate.name}' | ||
else: | ||
orig = f'sky {command_to_deprecate.name}' | ||
command_to_deprecate.invoke = _with_deprecation_warning( | ||
command_to_deprecate.invoke, alternative_command, orig) |
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.
should we consider implementing this as a method decorator?
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.
Either way seems fine to me. This is following L1195 and https://google.github.io/styleguide/pyguide.html#217-function-and-method-decorators :)
Changes
cpunode/gpunode/tpunode
sky launch
essentially does the same thing without the finalssh
admin
Now
Tested (run the relevant ones):
bash format.sh
pytest tests/test_smoke.py
pytest tests/test_smoke.py::test_fill_in_the_name
bash tests/backward_comaptibility_tests.sh