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

[Feature] Show time stamp and zone when code cell last ran #168792

Open
rrmistry opened this issue Nov 4, 2021 · 23 comments · Fixed by #168815
Open

[Feature] Show time stamp and zone when code cell last ran #168792

rrmistry opened this issue Nov 4, 2021 · 23 comments · Fixed by #168815
Assignees
Labels
feature-request Request for new features or functionality notebook-execution Issues related to running cells in a notebook
Milestone

Comments

@rrmistry
Copy link

rrmistry commented Nov 4, 2021

Would be good to capture when the code cell ran at the bottom of the cell.

For example:
image

This could be toggled with a switch if it is too verbose

@DonJayamanne DonJayamanne transferred this issue from microsoft/vscode-notebook-renderers Nov 11, 2021
@IanMatthewHuff IanMatthewHuff removed their assignment Nov 12, 2021
@greazer
Copy link
Member

greazer commented Nov 12, 2021

Thanks for the idea @rrmistry! Seems like a reasonable request. However, can I ask for a bit more detail as to what spurred this request on? Why do you find it important information to have?

@greazer greazer added the info-needed Issue requires more information from poster label Nov 12, 2021
@rrmistry
Copy link
Author

Thanks @greazer ! our use case is one where we have a lot of long-running notebooks executed by end-users on Azure VMs. Usual ETAs are in range of 4-8 hours.

So having a time stamp really makes it clear when troubleshooting which cells have completed in relation to external events.

One option is to alter user-behavior and ask to add print statements at the end of each code cell. But there are challenges here, especially for newly onboarded users / interns.

Having this functionality built-in would be hugely helpful in problem diagnosis!

@greazer greazer added notebook-execution Issues related to running cells in a notebook and removed info-needed Issue requires more information from poster labels Nov 15, 2021
@hamzamohdzubair
Copy link

This extension: last_executed_time provides the same functionality in jupyter notebooks

@wmayner
Copy link

wmayner commented Dec 15, 2021

Echoing @rrmistry, I often have expensive computations across several notebooks that I leave running, sometimes for days, and it's very useful to be able to see when they finished—e.g., was this the most recent run, or the one from last week?

I'm currently using the extension pointed out by @hamzamohdzubair, but I'd like to switch to VSCode instead of JupyterLab.

@dns4861
Copy link

dns4861 commented Feb 9, 2022

I would second that request. I often use notebooks for "quick-and-dirty" analysis that does not necessarily lead to a linear execution of cells. There it is very helpful to see when a cell has been executed last. I'm currently using the aforementioned extension in jupyter-lab but would like to switch everything over to VSCode.

@romanovzky
Copy link

I would like this feature as well.

@charris-msft
Copy link

My additional ask here is to keep displaying the last execution details until the cell completes its next successful run.

Right now, the previous execution time is replaced with the elapsed time when the cell is run again, preventing me from seeing whether I have enough time to get coffee, dinner or go on vacation before I can expect it to finish.

See the red text from this issue:
Add previous execution time next to elapsed time in cell #9818
image

@PedroMartinez4
Copy link

This feature would be incredibly useful for troubleshooting notebooks with long runtimes and/or many cells. Sometimes the process is not linear so a timestamp would greatly enhance the workflow of Jupyter in VS code.

@charris-msft
Copy link

Today I finished a new, purpose-built computer for working with Pandas, etc.
So the first thing I wanted to do is see how much performance improvement I get for my $1500.

I am running through each cell, and adding a comment about the configuration as well as the execution time.

Example:

# old Execution time: 1m 35.7s
# new 1 Standard Phase Control: 42.3s
# new 2 Extreme Phase Control: 36.8s

I don't expect most users to do this kind of perf testing and tweaking of the OC settings on the motherboard, but I do expect them to care about the time it takes to execute different versions of a cell.

Now, if you really want to delight folks like me how about showing the elapsed/execution time and the previous execution time (as described above); and show me show me the last 10 executions when I click on a clock/history icon next to the execution time that displays the time for each, and the contents of the cell when it was executed; and let me diff the code between two different executions.

@greazer greazer added the feature-request Request for new features or functionality label May 4, 2022
@now-youre-gittin-it
Copy link

I second @wmayner 's use-case, especially for machine learning tasks where many parameters may be tweaked and some but not all cells would need repeated execution. In fact, VSCode is helpful for running such code because it shows the time taken to run each cell by default, unlike JupyterLab. However, when the work is spread out over a period of multiple days and you need to troubleshoot issues, its tough to recall when the last cell-of-interest was run. Do hope this becomes a feature!

@maciejkos
Copy link

I strongly support this feature request too!

@FayDoom
Copy link

FayDoom commented Nov 24, 2022

That's a feature I would really like to see !

@lironle6
Copy link

lironle6 commented Dec 6, 2022

+1
Missing this terribly since migrating from Jupyter Lab

@roblourens
Copy link
Member

Adding this as a tooltip. This is in the current locale time zone. Let me know if this is what you are looking for

image

@roblourens roblourens transferred this issue from microsoft/vscode-jupyter Dec 11, 2022
@roblourens roblourens added this to the January 2023 milestone Dec 11, 2022
@maciejkos
Copy link

Thanks for working on it @roblourens !

I think a tooltip would be helpful in some use cases. What I think most people would want is what the last_executed_time Jupyter extension implements (as @greggman mentioned).

roblourens added a commit that referenced this issue Dec 12, 2022
@vscodenpa vscodenpa added unreleased Patch has not yet been released in VS Code Insiders insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Dec 12, 2022
@rrmistry
Copy link
Author

Hi @roblourens,

Thanks for the work!


It would still be nice to show timestamps directly in UI (without the tooltip)

Would you recommend:

  • Creating a new issue to track it in the backlog?
    OR
  • Re-Open this issue?
    OR
  • Is the VS Code team not planning on creating the display as the suggested example screenshot?
    screenshot

@wmayner
Copy link

wmayner commented Dec 12, 2022

Thank you for the tooltip! I second the previous comment, though—having it directly on the UI, so it can be seen at a glance, would be great.

@roblourens
Copy link
Member

We can look into having this behind a setting. I'd prefer to enable extensions to contribute this, but we don't have the right API for it.

@roblourens roblourens reopened this Dec 12, 2022
@roblourens roblourens modified the milestones: January 2023, Backlog Dec 12, 2022
@vscodenpa vscodenpa removed the insiders-released Patch has been released in VS Code Insiders label Dec 12, 2022
@nicocanali
Copy link

Thanks a lot for this feature!

Another suggestion could be to persist this somehow (maybe with notebook tags?). For example, see how Colab does it:

image

@tosaric
Copy link

tosaric commented Mar 29, 2023

Is this feature already implemented, and if yes, how to add it?

@joaofbravo
Copy link

joaofbravo commented Jun 19, 2023

Is this feature already implemented, and if yes, how to add it?

Wondering the same for the in-cell display (not the tooltip).

@marctorsoc
Copy link

Thanks a lot for this feature!

Another suggestion could be to persist this somehow (maybe with notebook tags?). For example, see how Colab does it:

image

See my long comment here: microsoft/vscode-jupyter#13338 (comment)

@nonoash
Copy link

nonoash commented Apr 9, 2024

Bumping this, doing some back and forth with Pycharm that has this feature implemented, it would be nice to have it in Vscode.
i'd prefer this kind of minimalist verbose as the first 2 pic below (maybe without the TZ) similar to Pycharm and Jupuyer plugin

Pycharm:
image

rather than a full 3 lines style

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality notebook-execution Issues related to running cells in a notebook
Projects
None yet
Development

Successfully merging a pull request may close this issue.