Improve parallelization: joblib backend, timing, logging#83
Merged
Conversation
- 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Users can enable logging with:
import logging logging.basicConfig(level=logging.INFO)