Live data from Hacker News

JupyterLab 4.0

blog.jupyter.org

161–170 of 199 posts

Re: JupyterLab 4.0

#161

What’s the current best-practice workflow for using with git? I see jupytext discussed in the comments but this saves the .py exported file. Is there a good clean method for storing tbe .ipynb files into git? It maybe is easier without the cell outputs?

I had good experiences with nbdime.

Re: JupyterLab 4.0

#162

I have been using VSCode notebooks with .ipynb file extensions, this gives me many advantages as I am able to configure things I'm not able in JupyterLab. I also have access to a very rich ecosystem of plugins. If there is anyone aware of VSCode as a solution but keeps using JupyterLab, could they explain why?

I've not been back to full-fledged Jupyter since getting in to VSCode. Most of my analytical work now is done in .py files, broken up into blocks with `#%%`. Real notebooks feel really clunky since adopting the approach.

Do you find it clunky that with cells inside py files the results appear to the right? It reduces a lot the screen real estate

Re: JupyterLab 4.0

#163

I have been using VSCode notebooks with .ipynb file extensions, this gives me many advantages as I am able to configure things I'm not able in JupyterLab. I also have access to a very rich ecosystem of plugins. If there is anyone aware of VSCode as a solution but keeps using JupyterLab, could they explain why?

I've not been back to full-fledged Jupyter since getting in to VSCode. Most of my analytical work now is done in .py files, broken up into blocks with `#%%`. Real notebooks feel really clunky since adopting the approach.

Nice! That's the Matlab way of doing things. I used to miss the Matlab workflow a lot when I was transitioning from Matlab to python. Although somewhat surprised they didn't just go with "## title" to match Matlabs' "%% title" (difference is comment character, and "# %%" reads like a python comment of a Matlab cell, I suppose it makes sense if you start with a m-file, python comment the whole thing and then work your way down translating cells from Matlab to numpy/scipy).

Personally I've since gone full literate programming mode to the point that I care far more about the narrative and documentation (of methods and results) that I will build and modify tools rather than go back to the Matlab way. I have been looking at Quarto but haven't had the time to see if I can transition my existing (and target/ideal) workflows.

I know it gets a lot of hate but ipynb have a lot of advantages as a format for building small custom tools for modification/transformation. Most of the complaints ultimately seem to boil down to not having tools that do what you want. Only want to diff the code cells? That's easy in a python utility that loads the notebook and looks at it intelligently. You can also use pre-commit to modify the notebook and strip out things that don't belong in git.

(Also nbdev... exists... and is a good example of how tools can help. Unfortunately it's too tied to GitHub functionality and the developer is a GitHub zealot who is oddly brittle and takes offense and demands justification if anyone mentions not wanting to rely on GitHub)

Re: JupyterLab 4.0

#164
post #77

Earlier quoted context omitted.

Really interesting setup. What kind of monthly expense does this run? And on a separate but related note, does it change the way you think about how you spend your time coding? (Assuming the costs do ramp up with usage such that time literally does equal money?)

I’ve no idea what the cost is since the company pays for it — I do need the horsepower to run some really large models and I suspect most people don’t need this kind of spec. But for my company it’s just part of the cost of doing business. There’s no IT and I can provision instances of any type (subject to limits) at any time.

Do you turn that lightbulb off at night when you clock out? Just curious.

Re: JupyterLab 4.0

#165

What’s the current best-practice workflow for using with git? I see jupytext discussed in the comments but this saves the .py exported file. Is there a good clean method for storing tbe .ipynb files into git? It maybe is easier without the cell outputs?

I use a pre-commit setup that strips and formats notebooks. IIRC I use a bunch of the nbqa hooks (to also apply black, isort, ruff, etc) but I'd have to check if I moved to different versions for some reason. My workflow uses papermill so the notebooks I store in git are essentially "parameterized templates that get instantiated with data".

https://pre-commit.com/

https://github.com/nbQA-dev/nbQA

https://papermill.readthedocs.io/en/latest/

Re: JupyterLab 4.0

#166

I keep experimenting with Jupyter in the context of telemetry/fault analysis and then hitting a wall with it where: - I get an analysis that I like, but there isn't a good way to share it with others, so I end up just taking screenshots. - There isn't a good way to take the same analysis and plug new data into it, other than to copy-paste the entire notebook. - The process to "promote" fragments of a notebook into be…

What do you use to collect telemetry data?

It's a mix of things, but the big one was ROS bag files for robots. So a lot of the conventional up-to-the-minute metrics workflows oriented around grafana/kibana don't really pan out when you're very interested in a five minute window that occurred three days ago, buried in a 1gb datafile.

Re: JupyterLab 4.0

#167
post #138

Earlier quoted context omitted.

> The process to "promote" fragments of a notebook into being reusable functions seemed very high-friction: basically you're rewriting it as a normal Python package and then adding that to Jupyter's environment. Don't get in that situation to begin with. Pop an `%load_ext` `%autoreload 2` at the top and just write functions in an imported .py file from the get go.

Ok, but let's also acknowledge that the mental model and levels of abstraction increased significantly, which presents a barrier to people without any prior software engineering experience, who are just getting into Python for "data science".

I don't think it's a huge leap to say your functions are stored in this .py file vs. in a cell above. the magic commands simply allow you to reload the functions automatically without needing to reimport / reload the kernel.

Re: JupyterLab 4.0

#168

Anyone got experience with the real time collaboration and have feedback?

I'm surprised I had to scroll this far down for anyone to ask this question. I've been trying to work out exactly how it works myself for the last hour, and there is no clear indicator on how to activate this mode. No documentation either, barring: https://github.com/jupyterlab/jupyter_collaboration What am I supposed to be doing here?

Clearly it just works. install that plugin and someone will just instantiate into your notebooks and start editing things.

Re: JupyterLab 4.0

#169
post #87
post #14

Earlier quoted context omitted.

Have you tried pyCharm? I believe even community (free) edition should have support You are looking for

Pycharm's notebook debugger is top notch, but their notebook implementation is, imo, clunky and slow.

Give it another shot if you haven't recently. I was a hardcore Jupyter Lab user and PyCharm pulled me away with their recent updates. Same hotkeys, good integrated tool support.

The VS Code implementation of notebooks has too much vertical space for me.

Re: JupyterLab 4.0

#170

I keep experimenting with Jupyter in the context of telemetry/fault analysis and then hitting a wall with it where: - I get an analysis that I like, but there isn't a good way to share it with others, so I end up just taking screenshots. - There isn't a good way to take the same analysis and plug new data into it, other than to copy-paste the entire notebook. - The process to "promote" fragments of a notebook into be…

> I get an analysis that I like, but there isn't a good way to share it with others, so I end up just taking screenshots. What would be your preferable way of sharing your analysis with others? - You can turn jupyter notebooks into pdfs directly in the jupyter UI. - You can upload them to Gitlab/Github and share the link to the rendered result. - You can upload them to Colab/Binder/Kaggle and let people play with the…

I think the ideal would be a link directly to the notebook which allows user-local editing/fiddling, with an option to fork the master copy and save it into their own workspace— basically the Github model.

But it sounds from both your comment and the many sibling replies that there are a number of tools now directly addressing this space, so I should definitely re-evaluate what is available.

Post reply on HN