|
|
|
|
|
by brummm
2465 days ago
|
|
I don't think Jupyter notebooks should be used for automated jobs. They're great for exploratory stuff but once things are getting fleshed out and cleaned up, one should move to proper python files that can be unit tested and versioned without having to go to crazy lengths... |
|
So if I am prototyping things that also would benefit from Markdown + Latex comments/documentation, it is far superior to a script with text comments. The only other situation where I've found them to be pretty useful are when utilizing their interactive widgets to let the end user explore the data in interesting ways.
But most people seem to use it as an IDE when it is quite deficient compared to something like PyCharm. Even for quick prototyping, I find PyCharm to be far more useful because a) I can directly run things in the IPython console, b) Examine variables in the variable display widget, c) Attach a debugger to the console at any time and start debugging with an unmatched debugging experience in Python land, d) Easily have the correct venv be utilized by the IPython console, e) Have outstanding linting + code introspection + autocompletion, f) Have sane git diffs that make it easy to use version control appropriately and frequently unlike with Jupyter notebooks, and probably a bunch of other benefits that come with having access to a powerful IDE. All of these make rapid prototyping much faster than anything I can achieve in a Jupyter notebook.
I've also been pretty unimpressed with the quality of the average Jupyter notebook that I find on Github repos. They encourage dumping everything into global state, rely on state across code cells in non-obvious manners and in general result in ugly scripts that need a lot more work if they had to be refactored into modular packages/modules.
Running automated jobs from Jupyter seems a bit crazy and I hope people stop to think whether that is the appropriate path to take when trying to write automated jobs.