agentsclimarketplace

Parallel processing

Skill cxcscmu/SkillLearnBench/skills/b1-one-shot-claude-opus-4-6/dbscan-parameter-tuning/parallel-processing

Parallel processing with joblib for grid search and batch computations across multiple CPU cores.From its SKILL.md

Install
npx -y skills add cxcscmu/SkillLearnBench --skill parallel-processing

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

SKILL.md

1.0 KB, 247 tokens by cl100k_base, as published. Nobody here has run it

Parallel Processing with joblib

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

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.