~/talk

Parallelization of code in Python for beginners

Talkat PyData Global 2022 · 2022-12-01..12-03· [python]
links:none on file
slides:none on file

Shows concrete recipes: use joblib with a number-of-workers ≈ physical CPU cores and tune chunk size, prefer multiprocessing for blackbox Python code, beware duplicating large inputs across processes. Demonstrates regex text cleaning on the Amazon Fine Food reviews dataset (~500k rows) where a single-thread run hit ~13 minutes and a 4-core joblib run drops to ~6 minutes. Also parallelizes 54 hyperparameter jobs (≈1 minute each) from ~60 to ~30 minutes and explains numpy/pandas avoids copying large arrays.

AI-written summary · about

  1. 0:00Introduction to parallelization
  2. 1:50When parallelization applies
  3. 6:08Multi-threading vs multi-processing
  4. 10:04CPU cores and memory usage
  5. 14:17Multi-processing over threading
  6. 18:57Text pre-processing with Joblib
  7. 26:08Hyperparameter tuning in parallel
  8. 27:52Parallelization gotchas and tips
  9. 29:16Summary
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.