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

cluster list filters #1233

Open
wants to merge 1 commit into
base: sb/cluster-list-last-active-info
Choose a base branch
from

Conversation

BelSasha
Copy link
Contributor

@BelSasha BelSasha commented Sep 4, 2024

runhouse cluster list --a output:
image

Copy link
Contributor Author

BelSasha commented Sep 4, 2024

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @BelSasha and the rest of your teammates on Graphite Graphite

@BelSasha BelSasha force-pushed the sb/cluster-list-last-active-info branch from 81ef086 to e41609e Compare September 5, 2024 07:23
@BelSasha BelSasha force-pushed the sb/cluster-list-allow-filtering branch 3 times, most recently from 4b2517b to e150b64 Compare September 8, 2024 13:04
@BelSasha BelSasha force-pushed the sb/cluster-list-last-active-info branch from e41609e to 1633300 Compare September 8, 2024 15:19
@BelSasha BelSasha force-pushed the sb/cluster-list-allow-filtering branch 4 times, most recently from 582a6d7 to 1c535c0 Compare September 9, 2024 10:38
@BelSasha BelSasha mentioned this pull request Sep 9, 2024
@BelSasha BelSasha force-pushed the sb/cluster-list-last-active-info branch from 1633300 to efd4fa9 Compare September 9, 2024 12:19
@BelSasha BelSasha force-pushed the sb/cluster-list-allow-filtering branch 2 times, most recently from 0dcf85b to 81c7cac Compare September 9, 2024 13:39
@BelSasha BelSasha force-pushed the sb/cluster-list-last-active-info branch from efd4fa9 to b2d1f10 Compare September 10, 2024 08:33
@BelSasha BelSasha force-pushed the sb/cluster-list-allow-filtering branch 2 times, most recently from b10541c to 4e7363b Compare September 10, 2024 11:38
@BelSasha BelSasha marked this pull request as ready for review September 10, 2024 11:40
@BelSasha BelSasha force-pushed the sb/cluster-list-allow-filtering branch from 4e7363b to 15b29f8 Compare September 11, 2024 12:27
runhouse/main.py Outdated Show resolved Hide resolved
den_clusters = den_clusters_resp.json().get("data")

# get sky live clusters
sky_live_clusters = sky.status(refresh=True)
Copy link
Collaborator

Choose a reason for hiding this comment

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

just confirming - does this by default only show live ones? (what about ones in "INIT" state for example?)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

According to skypilot documentation, sky.status() will return clusters with the following statuses: UP, INIT or STOPPED.

If the cluster is saved in den, we won't treat it as sky cluster, even if its status is INIT or STOPPED.

It’s more of a product question, but we’ll probably need to decide how to handle INIT clusters that are saved to the den. I think it might be worth consulting with Donny about this because I remember him mentioning that we want to minimize the use of sky commands and create a wrapper around them, so users will interact with the Runhouse API instead of the Skypilot API.

@BelSasha BelSasha force-pushed the sb/cluster-list-last-active-info branch from b2d1f10 to c31c146 Compare September 11, 2024 19:20
@BelSasha BelSasha force-pushed the sb/cluster-list-allow-filtering branch from 15b29f8 to 23218be Compare September 11, 2024 19:20
@BelSasha BelSasha force-pushed the sb/cluster-list-last-active-info branch from c31c146 to 447a12c Compare September 12, 2024 10:18
@BelSasha BelSasha force-pushed the sb/cluster-list-allow-filtering branch from 23218be to 3a3f0a4 Compare September 12, 2024 10:18
@BelSasha BelSasha force-pushed the sb/cluster-list-last-active-info branch from 447a12c to 1481a0d Compare September 12, 2024 13:15
@BelSasha BelSasha force-pushed the sb/cluster-list-allow-filtering branch 2 times, most recently from 5481af9 to a5edfdd Compare September 16, 2024 14:40
runhouse/main.py Outdated Show resolved Hide resolved
runhouse/main.py Outdated Show resolved Hide resolved
def _create_output_table(
total_clusters: int, running_clusters: int, displayed_clusters: int
):
displayed_running_clusters = (
Copy link
Collaborator

Choose a reason for hiding this comment

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

wondering if we should have some sort of pagination feature here, meaning if for example there are 100 clusters and we show 10 when the command is first run, we could make it easy for the user to toggle through the complete list. wdyt?

cc @mkandler - we're doing something similar for the resources page in Den right now also

runhouse/main.py Outdated Show resolved Hide resolved
runhouse/main.py Outdated Show resolved Hide resolved
runhouse/main.py Outdated Show resolved Hide resolved
if not sky_live_clusters and not den_clusters:
return [], [], []

sky_live_clusters = Cluster._get_unsaved_live_clusters(
Copy link
Collaborator

Choose a reason for hiding this comment

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

a little confused by the naming - just to clarify:

sky_live_clusters: sky clusters found in the local sky DB but not saved in den?
running_clusters: running clusters which are saved in Den?
not running clusters: clusters that are terminated / unknown / down which are also saved in Den?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

exactly, will add this explanation as a comment

@BelSasha BelSasha force-pushed the sb/cluster-list-last-active-info branch from e197306 to 2f32e58 Compare September 17, 2024 12:44
@BelSasha BelSasha force-pushed the sb/cluster-list-allow-filtering branch from a5edfdd to 88948f8 Compare September 17, 2024 12:44
@BelSasha BelSasha force-pushed the sb/cluster-list-last-active-info branch from 2f32e58 to d633ff7 Compare September 17, 2024 12:47
@BelSasha BelSasha force-pushed the sb/cluster-list-allow-filtering branch from 88948f8 to a388bb8 Compare September 17, 2024 12:47
@BelSasha BelSasha force-pushed the sb/cluster-list-allow-filtering branch from a388bb8 to 001f605 Compare September 18, 2024 07:28
@BelSasha BelSasha force-pushed the sb/cluster-list-last-active-info branch from d633ff7 to b98bad0 Compare September 18, 2024 09:33
@BelSasha BelSasha force-pushed the sb/cluster-list-allow-filtering branch from 001f605 to edf7c85 Compare September 18, 2024 09:33
@BelSasha BelSasha force-pushed the sb/cluster-list-last-active-info branch from b98bad0 to 324d6cf Compare September 18, 2024 09:46
@BelSasha BelSasha force-pushed the sb/cluster-list-allow-filtering branch 2 times, most recently from 436a61a to 2959b98 Compare September 18, 2024 09:48
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.

2 participants