-
Notifications
You must be signed in to change notification settings - Fork 39
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
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
c7b27e6
to
32adfc8
Compare
a6f81bb
to
9f39e33
Compare
32adfc8
to
569809f
Compare
9f39e33
to
186c665
Compare
569809f
to
bca2668
Compare
186c665
to
010f8de
Compare
bca2668
to
f3e4eb1
Compare
010f8de
to
0987928
Compare
f3e4eb1
to
9a05d70
Compare
0987928
to
5284e6d
Compare
9a05d70
to
8215e87
Compare
5284e6d
to
edda744
Compare
fdee6e4
to
7f63d96
Compare
7f63d96
to
6920e52
Compare
else None | ||
) | ||
|
||
# casting func_start_time_utc to datetime format |
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 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 = ...
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.
@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"
.
edda744
to
649d5ee
Compare
6920e52
to
28138da
Compare
Co-authored-by: Alexandra Belousov <sashabelousovrh@Alexandras-MacBook-Pro.local>
Co-authored-by: Alexandra Belousov <sashabelousovrh@Alexandras-MacBook-Pro.local>
Co-authored-by: Alexandra Belousov <sashabelousovrh@Alexandras-MacBook-Pro.local>
Co-authored-by: Alexandra Belousov <sashabelousovrh@Alexandras-MacBook-Pro.local>
Output will look as follows:
![image](https://private-user-images.githubusercontent.com/141743480/364433004-3d262a82-660d-4608-a745-8d95febf84a8.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyNDM2MDYsIm5iZiI6MTczOTI0MzMwNiwicGF0aCI6Ii8xNDE3NDM0ODAvMzY0NDMzMDA0LTNkMjYyYTgyLTY2MGQtNDYwOC1hNzQ1LThkOTVmZWJmODRhOC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjExJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMVQwMzA4MjZaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT02YTg5YmVhNTk0MWNmNTA1ZjI5MDViODUwOGQ1ZTgwMjUxZjg3ODUxNTY4MmEwOGI1ZTI0ZGNmNjJjM2I1MzJmJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.KAXZajlRezhAGoS9Msr2M5BQnZlAIZK5vuUICVXkDAE)