You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Theme are specific to the "lab" template, they will not work for the "classic" template
46
-
47
44
.. note::
48
45
Changing the theme from the notebook metadata may change in the future if this features moves to nbconvert.
49
46
@@ -247,7 +244,7 @@ Here is an example of the configuration file. This file needs to be placed in th
247
244
"""Do your stuffs here"""
248
245
return notebook
249
246
250
-
c.Voila.prelaunch_hook = hook_function
247
+
c.Voila.prelaunch_hook = hook_function
251
248
252
249
- Start Voila from a python script:
253
250
@@ -273,7 +270,7 @@ Here is an example of a custom `prelaunch-hook` to execute a notebook with `pape
273
270
from papermill.parameterize import parameterize_notebook
274
271
275
272
# setup for papermill
276
-
#
273
+
#
277
274
# these two blocks are done
278
275
# to avoid triggering errors
279
276
# in papermill's notebook
@@ -423,7 +420,7 @@ For more information about these options, check out the `Jupyter Server <https:/
423
420
Preheated kernels
424
421
==================
425
422
426
-
Since Voilà needs to start a new jupyter kernel and execute the requested notebook in this kernel for every connection, this would lead to a long waiting time before the widgets can be displayed in the browser.
423
+
Since Voilà needs to start a new jupyter kernel and execute the requested notebook in this kernel for every connection, this would lead to a long waiting time before the widgets can be displayed in the browser.
427
424
To reduce this waiting time, especially for heavy notebooks, users can activate the preheating kernel option of Voilà.
428
425
429
426
.. warning::
@@ -451,25 +448,25 @@ will set the variable "FOO" in all preheated kernels.
451
448
452
449
If the pool size does not match the user's requirements, or some notebooks need to use specific environment variables..., additional settings are needed. The easiest way to change these settings is to provide a file named `voila.json` in the same folder containing the notebooks. Settings for preheating kernel ( list of notebooks does not need preheated kernels, number of kernels in pool, refilling delay, environment variables for starting kernel...) can be set under the `VoilaKernelManager` class name.
453
450
454
-
Here is an example of settings with explanations for preheating kernel option.
451
+
Here is an example of settings with explanations for preheating kernel option.
455
452
456
453
.. code-block:: python
457
454
458
455
# voila.json
459
456
{
460
457
"VoilaConfiguration": {
461
458
# Activate or deactivate preheat kernel option.
462
-
"preheat_kernel": true
459
+
"preheat_kernel": true
463
460
},
464
461
"VoilaKernelManager": {
465
462
# A list of notebook name or regex patterns to exclude notebooks from using preheat kernel.
466
463
"preheat_blacklist": [
467
464
"notebook-does-not-need-preheat.ipynb",
468
465
"^.*foo.*$",
469
466
...
470
-
],
467
+
],
471
468
# Configuration for kernel pools
472
-
"kernel_pools_config": {
469
+
"kernel_pools_config": {
473
470
# Setting for `voila.ipynb` notebook
474
471
"voila.ipynb": {
475
472
"pool_size": 3, # Size of pool
@@ -515,7 +512,7 @@ In normal mode, Voilà users can get the `query string` at run time through the
515
512
.. code-block:: python
516
513
517
514
import os
518
-
query_string = os.getenv('QUERY_STRING')
515
+
query_string = os.getenv('QUERY_STRING')
519
516
520
517
In preheating kernel mode, users can prepend with ``wait_for_request`` from ``voila.utils``
521
518
@@ -536,9 +533,9 @@ If the Voilà websocket handler is not started with the default protocol (`ws`),
536
533
{
537
534
...
538
535
"VoilaKernelManager": {
539
-
"kernel_pools_config": {
536
+
"kernel_pools_config": {
540
537
"foo.ipynb": {
541
-
"kernel_env_variables": {
538
+
"kernel_env_variables": {
542
539
"VOILA_APP_IP": "192.168.1.1",
543
540
"VOILA_APP_PORT": "6789",
544
541
"VOILA_WS_PROTOCOL": "wss"
@@ -561,7 +558,7 @@ Hiding output and code cells based on cell tags
561
558
Voilà uses `nbconvert <https://github.com/jupyter/nbconvert>`_ under the hood to render the notebooks so we can benefit from some of its advanced functionalities to hide code and output cells based on cell tags.
562
559
563
560
To hide the cell output for every cell in your notebook that has been tagged (`how to tag <https://jupyter-notebook.readthedocs.io/en/stable/changelog.html#cell-tags>`_) with "hide" in Voilà::
0 commit comments