-
Notifications
You must be signed in to change notification settings - Fork 392
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
The logs in jupyter are too verbose + notebook is not trusted after black / reload #797
Comments
In a debug session with Jupytext + Jupyter I was seeing missing cell ids when the notebook is saved, and these missing ids were the cause for trust issues (since the notebook was signed without the cell ids) In another session with just JupyterLab I can't reproduce this... On the Jupytext session I had these versions
while on the Jupyter-only session I have
So it seems that the missing cell ids were fixed in between. NB: Apparently the cell ids have been added to Jupyter Lab 3.0.13 (jupyterlab/jupyterlab#10018) |
Hi there, first off, thanks for you wonderful tool! Anyways, just noticed the same verbose result too on jupytext [I 2021-09-14 17:40:56.952 ServerApp] Loading Jupytext configuration file at /pyproject.toml
[I 2021-09-14 17:41:07.361 ServerApp] Loading Jupytext configuration file at /pyproject.toml
[I 2021-09-14 17:41:17.651 ServerApp] Loading Jupytext configuration file at /pyproject.toml
[I 2021-09-14 17:41:28.062 ServerApp] Loading Jupytext configuration file at /pyproject.toml
[I 2021-09-14 17:41:38.469 ServerApp] Loading Jupytext configuration file at /pyproject.toml Relevant installed dependencies:
|
Thank you @weiji14! Well currently there is a line every time the configuration file is reloaded: jupytext/jupytext/contentsmanager.py Lines 487 to 491 in e1c4696
And the config file is reloaded every time a notebook/file/folder is opened/created or saved, and also even when the content of a directory is listed (although in that last case we use a one-second cache). I think it is helpful to let the user know which config file is being used, and also I prefer to have the log every time the config is actually read. So maybe I would prefer to only change the behavior for folders, i.e. increase the duration of the cache. What do you think? Would you like to experiment with different values and let us know which duration you find best in the below? jupytext/jupytext/contentsmanager.py Line 510 in e1c4696
|
Hmm, a 1 second cache seems too fast... I doubt configuration files change very often, maybe increase it to something like 5 minutes? I'm still thinking whether this could be logged at the debug-level instead. Or, if you prefer keeping it at the info-level, only print out the log message if the configuration file did change from last time (e.g. change the message from "Loading Jupytext config..." to "Loaded Jupytext config..."). |
Hi @weiji14 , a quick comment on the resolution for this issue... I decided to refresh the config only when a notebook is opened, saved, or when a new directory is listed - No more periodical updates, so much less logs. The difference with the previous behavior is only for listing directories, so I do not expect much impact on users (the updated config will be used anyway when they open a file). |
Here is an short extract of the logs of my jupyter lab:
I would prefer to have
/Fibonacci.py
andFibonacci.py
but there is a single.py
fileNotebook Fibonacci.ipynb is not trusted
, that came after I ranblack
and reloaded the.py
notebook.The text was updated successfully, but these errors were encountered: