Skip to content
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

[Core] Launching cluster autodowned or manually terminated #2130

Merged
merged 7 commits into from
Jun 26, 2023

Conversation

Michaelvll
Copy link
Collaborator

@Michaelvll Michaelvll commented Jun 24, 2023

Fixes #2129

We need to refactor the code in execution and the _check_existing_cluster, as the optimization and the provision are actually quite coupled, as raised by @WoosukKwon before. This PR is a fix that will unblock the issue #2129, but not the coupled issue. In the long term, we need to rearchitect the code here.

Tested (run the relevant ones):

Copy link
Collaborator

@WoosukKwon WoosukKwon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for fixing the bug. Left small comments.

sky/backends/cloud_vm_ray_backend.py Outdated Show resolved Hide resolved
sky/backends/cloud_vm_ray_backend.py Outdated Show resolved Hide resolved
sky/backends/cloud_vm_ray_backend.py Outdated Show resolved Hide resolved
Comment on lines 3715 to 3717
assert isinstance(previous_handle,
CloudVmRayResourceHandle), (previous_handle,
cluster_name)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style nit: The code looks a bit ugly tbh.

Suggested change
assert isinstance(previous_handle,
CloudVmRayResourceHandle), (previous_handle,
cluster_name)
is_cloud_vm_handle = isinstance(previous_handle,
CloudVmRayResourceHandle)
assert is_cloud_vm_handle, (previous_handle, cluster_name)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, mypy is not clear enough to have this two-line assertion. I changed the output to be a string, so as to make it look a bit better. PTAL. : )

@Michaelvll Michaelvll merged commit 3e481d3 into master Jun 26, 2023
@Michaelvll Michaelvll deleted the fix-nonetype-api branch June 26, 2023 06:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Python API] NoneType issue when re-launching a cluster terminated manually on the console
2 participants