Parallel Processing with joblib

SkillSearch

Parallel processing with joblib for grid search and batch computations. Use when speeding up computationally intensive tasks across multiple CPU cores.

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the Parallel Processing with joblib skill

What this skill tells your AI

The instructions your AI receives, as published by cxcscmu/skilllearnbench in skills/human_authored/dbscan-parameter-tuning/parallel-processing/SKILL.md and read by ahel’s review.

Grid Search Parallelization

from joblib import Parallel, delayed
import itertools

def evaluate_params(min_samples, epsilon, shape_weight, citsci_grouped, expert_grouped, all_images):
    # ... evaluate one hyperparameter combination
    return f1_avg, delta_avg, min_samples, epsilon, shape_weight

param_grid = list(itertools.product(
    range(3, 10),           # min_samples
    range(4, 25, 2),        # epsilon
    [round(0.9 + i*0.1, 1) for i in range(11)]  # shape_weight
))

results = Parallel(n_jobs=-1)(
    delayed(evaluate_params)(ms, eps, sw, citsci_grouped, expert_grouped, all_images)
    for ms, eps, sw in param_grid
)

Key Points

  • n_jobs=-1 uses all available cores
  • delayed() wraps the function for lazy evaluation
  • Each call should be independent (no shared mutable state)
  • Pass pre-grouped DataFrames to avoid redundant groupby in each worker

Signals

GitHub stars
83
Forks
5
Last commit
Jul 2026
Advanced
Catalog kind
skill
Gateway key
parallel-processing
Source
github.com/cxcscmu/skilllearnbench