def _test_tutorial_nb(tutorial): """Run tutorial Jupyter notebook to catch any execution error. Parameters ---------- tutorial : str the name of the tutorial to be tested Returns ------- True if there are no warnings or errors. """ return run_notebook(tutorial, TUTORIAL_DIR, kernel=KERNEL, no_cache=NO_CACHE)
def _test_notebook(notebook, override_epochs=True): """Run Jupyter notebook to catch any execution error. Args: notebook : string notebook name in folder/notebook format epochs : boolean whether or not to override the number of epochs to 1 Returns: True if the notebook runs without warning or error. """ if override_epochs: _override_epochs(notebook) return run_notebook(notebook, NOTEBOOKS_DIR, kernel=KERNEL, temp_dir=NOTEBOOKS_DIR)
def _test_notebook(notebook, override_epochs=True): """Run Jupyter notebook to catch any execution error. Args: notebook : string notebook name in folder/notebook format override_epochs : boolean whether or not to override the number of epochs to 1 Returns: True if the notebook runs without warning or error. """ # Some notebooks will fail to run without error if we do not override # relative paths to the data and image directories. _override_relative_paths(notebook) if override_epochs: _override_epochs(notebook) return run_notebook(notebook, NOTEBOOKS_DIR, kernel=KERNEL, temp_dir=NOTEBOOKS_DIR)