Remove non-functional joblib parallelization from TrendFit#428
Remove non-functional joblib parallelization from TrendFit#428blalterman merged 2 commits intomasterfrom
Conversation
Documents the two-repo architecture for private development with public releases via rsync-based export script. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Joblib's loky backend deadlocks on macOS with Python 3.12's spawn start method. The multiprocessing backend fails due to unpicklable closures, and the threading backend provides no CPU-bound speedup. Remove the non-functional parallel code path, related tests, benchmarks, and the performance optional dependency. All Phase 4 features in core.py (residuals use_all, in-place mask ops, xoutside/youtside) are preserved — they have zero joblib dependency. Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
|
Claude finished @blalterman's task —— View job PR Review: Remove joblib parallelization from TrendFitI've completed a thorough review of this pull request. Here's my comprehensive analysis: 🎯 SummaryThis is an excellent refactoring that removes 540 lines of non-functional joblib parallelization code. The changes are well-executed, maintain backward compatibility (except for breaking changes), and improve code maintainability. ✅ StrengthsCode Quality & Best Practices
Architecture & Design
Testing Strategy
🔍 Technical AnalysisPerformance Considerations ⚡
Security & Dependencies 🔒
Breaking Changes Assessment
|
SolarWindPy Documentation Validation - Python 3.11✅ Status: PASSED Essential Metrics:
🎉 All essential documentation examples working! |
Pull Request Description
Remove joblib parallelization from
TrendFit.make_1dfits(). It was added in commit8e4ffb2cbut has never worked on the target platform (macOS + Python 3.12):loky(default)spawnstart method + loky process poolmultiprocessingthreadingcurve_fitn_jobs=1)Changes (-530 lines)
trend_fits.py: Remove joblib imports,JOBLIB_AVAILABLEflag, and simplifymake_1dfits()to sequential-only (100% coverage)test_trend_fits_advanced.py: RemoveTestTrendFitParallelizationclass (7 tests), unused imports, update integration testpyproject.toml: Removeperformance = ["joblib>=1.3.0"]optional dependencybenchmarks/fitfunctions_performance.py: Delete entirely (179 lines, sole purpose was parallel vs sequential benchmarking)All Phase 4 features in
core.py(residualsuse_all, in-place mask ops,xoutside/youtside) are preserved — zero joblib dependency.Type of Change
Testing
pytest -q) — 2188 passedpytest --cov=solarwindpy --cov-report=term) —trend_fits.pyat 100%; project-wide at 82% (pre-existing).claude/hooks/test-runner.sh --physics)Code Quality
black solarwindpy/ tests/)flake8 solarwindpy/ tests/)cd docs && make html)doc8check passedAttribution & Documentation
Breaking Changes
make_1dfits()no longer acceptsn_jobs,verbose, orbackendkwargs. Callers passing these will get aTypeError. This was never in a public release, so no deprecation path is needed.Additional Context
The
[performance]optional dependency group was never tested in CI and never installed in any workflow. The benchmark file existed solely for parallel-vs-sequential comparison.🤖 Generated with Claude Code