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

Support for jupyter-cache? #173

Open
jeromekelleher opened this issue Jan 20, 2021 · 3 comments
Open

Support for jupyter-cache? #173

jeromekelleher opened this issue Jan 20, 2021 · 3 comments

Comments

@jeromekelleher
Copy link

Is support for jupyter-cache something that is planned/feasible in jupyter-sphinx? It is very useful to be able to avoid reexecuting code blocks over and over when working on a page.

@akhmerov
Copy link
Member

Hi @jeromekelleher!

There are several aspects to your proposal that I'd like to bring up in order to make an informed decision.

  • First of all, execution of the notebooks is extremely localized in the codebase, and therefore it would take a limited amount of work to make this more general and include jupyter-cache.
  • Bringing in another execution framework adds complexity in configuration (e.g. where jupyter-cache should store its cache), and I think limiting this complexity is a good idea.
  • Sphinx allows document-level parallelization via multiprocessing. I am not sure whether jupyter-cache would play nicely with that (see also Add parallel execution implementation executablebooks/jupyter-cache#37)
  • Likewise sphinx has its own caching machinery. jupyter-sphinx uses it to not reexecute files that didn't change at all. It may be possible to rely on that, although I'm unsure whether it's a reasonable approach.
  • Multiple cache layers are frequently not transparent to the users and lead to subtle problems when it isn't clear which cache should be invalidated.

So overall I am open to incorporate integration with jupyter-cache, and it seems like a good idea, but planning this would require addressing the above considerations.

@jeromekelleher
Copy link
Author

Thanks for the detailed response @akhmerov, this is very helpful! I agree it would be quite a lot of extra complexity and its debatable whether it's worth it.

@akhmerov
Copy link
Member

I didn't mean to say that it's not worth it. It's likely worth, however the specific implementation requires evaluating and answering the above questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants