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

Add execution timings in code cell metadata for v4 spec #144

Merged
merged 3 commits into from
Dec 12, 2019

Conversation

Madhu94
Copy link
Contributor

@Madhu94 Madhu94 commented Jul 31, 2019

@saulshanabrook
Copy link
Contributor

Thanks for submitting this @Madhu94! We want to start being able to record timing information in JupyterLab, so if anyone has feedback on this proposal that would be helpful.

@westurner
Copy link
Contributor

westurner commented Aug 7, 2019 via email

@saulshanabrook
Copy link
Contributor

Yeah it should be optional.

In JupyterLab the proposal is to default to not storing timing.

@minrk
Copy link
Member

minrk commented Aug 8, 2019

Makes sense. It's probably worth noting in the spec that this should be an opt-in behavior that should be used with great caution when working with version control. The PR also specifies the fields and meaning of several timings. Do you want to include those in the spec here?

@Madhu94
Copy link
Contributor Author

Madhu94 commented Aug 9, 2019

@minrk The schema was somewhat loose and doesn't refer to the timings directly. Should I add those ?

@saulshanabrook
Copy link
Contributor

@Madhu94 You could add them as optional and also allow other unregistered options. I had a first go at some descriptions already:

  • Starting:
    • timing.iopub.status.busy: header.date of iopub status busy message
    • timing.iopub.execute_input: header.date of iopub execute_input message
    • timing.shell.execute_reply.started: metadata.started of shell execute_reply message
  • Ending
    • timing.shell.execute_reply: header.date of shell execute_repl
    • timing.iopub.status.idle: header.date of iopub status idle message

@Madhu94
Copy link
Contributor Author

Madhu94 commented Aug 13, 2019

Minor nitpick - do you think execute_reply.started should belong in nbformat? It isn't really part of the official jupyter spec and comes with the metadata from the ipykernel, so other kernels may not have it.

Edit: The comment there also says started is part of ipyparallel and it would be removed.

@saulshanabrook
Copy link
Contributor

do you think execute_reply.started should belong in nbformat? It isn't really part of the official jupyter spec and comes with the metadata from the ipykernel, so other kernels may not have it.

Good catch! Yeah then I wouldn't include it, thanks.

@Madhu94 Madhu94 force-pushed the add-cell-execution-timing-metata branch from 251aaee to d56481c Compare August 13, 2019 19:36
@Madhu94
Copy link
Contributor Author

Madhu94 commented Aug 27, 2019

As an FYI, I've renamed timing to execution. This is so that we can leave room for adding kernel information, etc later. During the weekly meeting, we decided to make this an experimental feature - update. So, it might be good to punt on this PR until we see how the new feature plays out in lab

@MSeal
Copy link
Contributor

MSeal commented Oct 25, 2019

@Madhu94 @saulshanabrook Has this change felt solidified in Lab yet? There were some conversations about how to consistently record execution timing in a couple other projects and I wound up getting to this PR. I'd be happy to help push the format improvement change through here to make it more consistent (e.g. papermill has it's own format for execution time saved in the papermill metadata field).

@Madhu94
Copy link
Contributor Author

Madhu94 commented Oct 25, 2019

@MSeal Re: lab, it was a very recent change and I doubt anyone's started building on top of this yet or given any feedback. I'd be happy to have your inputs to improve the current state of things.

@saulshanabrook, do you think we should go ahead here?

@saulshanabrook
Copy link
Contributor

@MSeal Yeah I think this is a good place to have that discussion. If this format seams alright to you we should figure out how to get this PR accepted.

@captainsafia
Copy link
Member

captainsafia commented Dec 11, 2019

@saulshanabrook @Madhu94 Do you have any updates?

If there is no feedback on people building on top of the notebook, have you received feedback from notebook users?

@saulshanabrook
Copy link
Contributor

@captainsafia We are using this in JupyterLab! So 👍 on merging this in from our side.

Copy link
Contributor

@MSeal MSeal left a comment

Choose a reason for hiding this comment

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

Going to merge this then. Do we want to formulate a patch release with this change? Is there anything else we should look at at the same time?

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.

6 participants