Skip to content

Improve parallelization: joblib backend, timing, logging#83

Merged
monte-flora merged 2 commits into
masterfrom
improve/parallelization
Apr 1, 2026
Merged

Improve parallelization: joblib backend, timing, logging#83
monte-flora merged 2 commits into
masterfrom
improve/parallelization

Conversation

@monte-flora
Copy link
Copy Markdown
Owner

  • Migrate run_parallel from multiprocessing.Pool to joblib.Parallel with 'loky' backend for fork-safety on Python 3.12+
  • Add @track_timing decorator to all compute methods — stores computation_time_seconds in returned dataset .attrs
  • Replace LogExceptions with _safe_call using Python standard logging (logger = logging.getLogger("skexplain"))
  • Add _resolve_n_jobs helper following sklearn convention: n_jobs=-1 (all CPUs), -2 (all but one), 0.5 (fraction)
  • Remove deprecated text_progessbar and LogExceptions class
  • Fix mutable default kwargs={} in run_parallel signature
  • Add structured log messages for parallel task start/completion

Users can enable logging with:
import logging logging.basicConfig(level=logging.INFO)

monte-flora and others added 2 commits April 1, 2026 17:50
- Migrate run_parallel from multiprocessing.Pool to joblib.Parallel
  with 'loky' backend for fork-safety on Python 3.12+
- Add @track_timing decorator to all compute methods — stores
  computation_time_seconds in returned dataset .attrs
- Replace LogExceptions with _safe_call using Python standard logging
  (logger = logging.getLogger("skexplain"))
- Add _resolve_n_jobs helper following sklearn convention:
  n_jobs=-1 (all CPUs), -2 (all but one), 0.5 (fraction)
- Remove deprecated text_progessbar and LogExceptions class
- Fix mutable default kwargs={} in run_parallel signature
- Add structured log messages for parallel task start/completion

Users can enable logging with:
  import logging
  logging.basicConfig(level=logging.INFO)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Update .readthedocs.yaml: Python 3.11, ubuntu-22.04, pandoc via apt
- Remove broken extra_requirements: docs (doesn't exist in setup.py)
- Update docs/requirements.txt: loosen sphinx/nbsphinx version pins
- Fix setup.py: distutils.version.LooseVersion → packaging.version.Version
- Fix setup.py: distutils.sysconfig → sysconfig (Python 3.12 compat)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@monte-flora monte-flora merged commit 312b903 into master Apr 1, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant