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

status cli prints active funtions info #1224

Merged
merged 2 commits into from
Sep 5, 2024

Conversation

BelSasha
Copy link
Contributor

@BelSasha BelSasha commented Sep 1, 2024

Output will look as follows:
image

@BelSasha BelSasha marked this pull request as ready for review September 1, 2024 14:48
Copy link
Contributor Author

BelSasha commented Sep 1, 2024

@BelSasha BelSasha force-pushed the sb/cluster-status-print-actuve-funcs branch from c7b27e6 to 32adfc8 Compare September 1, 2024 15:36
@BelSasha BelSasha force-pushed the sb/status-cli-print-cloud-proparties branch from a6f81bb to 9f39e33 Compare September 3, 2024 15:39
@BelSasha BelSasha force-pushed the sb/cluster-status-print-actuve-funcs branch from 32adfc8 to 569809f Compare September 3, 2024 15:40
@BelSasha BelSasha force-pushed the sb/status-cli-print-cloud-proparties branch from 9f39e33 to 186c665 Compare September 4, 2024 07:24
@BelSasha BelSasha force-pushed the sb/cluster-status-print-actuve-funcs branch from 569809f to bca2668 Compare September 4, 2024 07:24
@BelSasha BelSasha force-pushed the sb/status-cli-print-cloud-proparties branch from 186c665 to 010f8de Compare September 4, 2024 09:04
@BelSasha BelSasha force-pushed the sb/cluster-status-print-actuve-funcs branch from bca2668 to f3e4eb1 Compare September 4, 2024 09:04
@BelSasha BelSasha force-pushed the sb/status-cli-print-cloud-proparties branch from 010f8de to 0987928 Compare September 4, 2024 10:45
@BelSasha BelSasha force-pushed the sb/cluster-status-print-actuve-funcs branch from f3e4eb1 to 9a05d70 Compare September 4, 2024 10:45
@BelSasha BelSasha force-pushed the sb/status-cli-print-cloud-proparties branch from 0987928 to 5284e6d Compare September 4, 2024 14:40
@BelSasha BelSasha force-pushed the sb/cluster-status-print-actuve-funcs branch from 9a05d70 to 8215e87 Compare September 4, 2024 14:40
@BelSasha BelSasha force-pushed the sb/status-cli-print-cloud-proparties branch from 5284e6d to edda744 Compare September 4, 2024 14:43
@BelSasha BelSasha force-pushed the sb/cluster-status-print-actuve-funcs branch 2 times, most recently from fdee6e4 to 7f63d96 Compare September 4, 2024 14:56
@BelSasha BelSasha force-pushed the sb/cluster-status-print-actuve-funcs branch from 7f63d96 to 6920e52 Compare September 4, 2024 15:24
else None
)

# casting func_start_time_utc to datetime format
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit but can we split this by whether the function is active for readability, instead of handling it separately for each computation?

if isinstance(resource_type, Function) and if resource_info.get("active_function_calls"):
    # get start + end time
    # compute running time
    # is func running str = ...
else:
    # is func running str = ...
full_str = ...

Copy link
Contributor Author

@BelSasha BelSasha Sep 5, 2024

Choose a reason for hiding this comment

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

@carolineechen yeah, good point, updated the code.
btw we can't really execute isinstance(resource_type, Function), because the resource_type is saved as str in the status json output, therefore I compared it to "runhouse.Function".

@BelSasha BelSasha force-pushed the sb/status-cli-print-cloud-proparties branch from edda744 to 649d5ee Compare September 5, 2024 07:00
@BelSasha BelSasha force-pushed the sb/cluster-status-print-actuve-funcs branch from 6920e52 to 28138da Compare September 5, 2024 07:00
Base automatically changed from sb/status-cli-print-cloud-proparties to main September 5, 2024 13:55
@BelSasha BelSasha merged commit d2c478e into main Sep 5, 2024
12 checks passed
@BelSasha BelSasha deleted the sb/cluster-status-print-actuve-funcs branch September 5, 2024 14:07
BelSasha added a commit that referenced this pull request Sep 17, 2024
Co-authored-by: Alexandra Belousov <sashabelousovrh@Alexandras-MacBook-Pro.local>
BelSasha added a commit that referenced this pull request Sep 17, 2024
Co-authored-by: Alexandra Belousov <sashabelousovrh@Alexandras-MacBook-Pro.local>
BelSasha added a commit that referenced this pull request Sep 18, 2024
Co-authored-by: Alexandra Belousov <sashabelousovrh@Alexandras-MacBook-Pro.local>
BelSasha added a commit that referenced this pull request Sep 18, 2024
Co-authored-by: Alexandra Belousov <sashabelousovrh@Alexandras-MacBook-Pro.local>
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