IanOzsvald

Joined 18 years ago

Karma
230
Submissions
96
Member since
Sep 24
Blogger (http://IanOzsvald.com) for A.I., Python, Linux, entrepreneurship in the UK. I talk on higher performance Python and doing data science successfully at https://notanumber.email/

I'm a co-founder of the PyDataLondon monthly data science meetups and conference series, author of O'Reilly's High Performance Python.

View on Hacker News

Recent submissions

Comment · 27 days ago
I don't know La Fromagerie. I do know Little Mouse in Crystal Palace, they are encouraging the re-creation of "lost" British cheeses.
Comment · 4 months ago
Comment · 6 months ago
Comment · 1 year ago
+1 Merlin. I also stop and do a few minutes with Duolingo in the park, then take a breath and just listen to the wind and birdsong.
Comment · 2 years ago
There's a profiler cell magic for Notebooks which helps identify if you run out of VRAM (it says what runs on CPU and GPU). There's an open PR to turn on low-VRAM reporting as a diagnostic. CuDF is impressive, but getting a working setup can be a PITA (and then if you upgrade libraries...). Personality I think it fits in the production pipeline for obvious bottlenecks on well tended configurations, using it in the r&d flow might cost diagnostic time getting and keeping it working (YMMV etc)
Comment · 2 years ago
Thanks :-) I use it for all my talks and finally decided I'd better start sharing it a bit. It really is useful to understand the memory cost of things like Pandas operations
Comment · 2 years ago
I'm the co-author of High Performance Python, Micha and I are working on the 3rd ed (for 2025). Lots of bits of the book came from my past conference talks, they're available here (and the public talks will generally be on youtube): https://speakerdeck.com/ianozsvald

Mostly that content has a scientific focus but the obvious thing that carries over to any part of Python is _profiling_ to figure out what's slow. Top tools I'd recommend are:

* https://pypi.org/project/scalene/ combined cpu+memory+gpu profiling

* https://github.com/gaogaotiantian/viztracer get a timeline of execution vs call-stack (great to discover what's happening deep inside pandas)

* my https://pypi.org/project/ipython-memory-usage/ if you're in Jupyter Notebooks (built on https://github.com/pythonprofilers/memory_profiler which sadly is unmaintained)

* https://github.com/pyutils/line_profiler/

Comment · 2 years ago
@munhitsu gave me a demo at the weekend (I'm on Android and it is iPhone only), it seemed pretty slick and very easy to use, though I confess not something I personally need right now
Comment · 2 years ago
I've just spent the morning uninstalling and reinstalling different versions of Nvidia driver (Linux) to get nvcc back for llama.cpp after Linux Mint did an update - I had CUDA 12.3 and 12.4 (5GB each), in conflict, with no guidance. 550 was the charm, not 535 that was fine in January. This is the third time I'm going this since December. It is painful. I'm not in a hurry to return to my cuDF experiments as I'm pretty sure that'll be broken too (as it has been in the past). I'm the co author of O'Reilly's High Performance Python book and this experience mirrors what I was having with pyCUDA a decade back.
Comment · 2 years ago
Don't forget that a sequence of numpy operations will likely each allocate their own temporary memory. Numba can often fuse these together, so although the implementation behind numpy is compiled C you end up with fewer memory allocations and less memory pressure, so you still get your results even faster. Numba also offers the OpenMP parallel tools too. I have a nice sequence of simulations in my Higher Performance Python course going from raw python through numpy then to Numba showing how this all comes together. Just try having a function with a=np.fn1(x); b=np.fn2(a); c=np.fn3(b) etc and compile it with @jit and you should get a performance impact. Maybe you can also turn on the OpenMP parallelizer too.
Comment · 2 years ago
Really Numba will speed up numpy and some scipy (there's partial API coverage) and math based pure python. I think it is unlikely it'd be used away from math problems. As another commenter mentioned it can be used to accelerate numpy-array based Pandas (but not the newer Arrow based arrays), and again that's for numeric work.
Comment · 2 years ago
That's my book :-) Micha and I are working on the 3rd edition right now. Cheers!
Comment · 2 years ago
How about hyperlinking each title so it can easily be opened in a new tab?
Comment · 2 years ago
You may want to look sideways to companies such as hedge funds. They have DNN teams and experiment with LLMs, you may find interesting optimisation opportunities with such teams. Charge according to opportunity that you open up, not electricity saved!
Comment · 3 years ago
In the UK I use Redber for beans, I drink decaf (Swiss Water prices) fresh ground in the afternoon and have 2-3 caf cups in the morning. Redber had a wide selection and several roast levels. No caffeine after noon. I use a 2-cup espresso Bialetti stove top, the second smallest.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton