Repository navigation
v0.3.4 - Workflow System & CI Fixes
Highlights
Workflow System (Unified fit() Entry Point)
-
Unified
fit()function: Single entry point that coexists withcurve_fit()andcurve_fit_large()- Automatic workflow selection based on dataset size and memory
- Named presets for common use cases ('fast', 'robust', 'global', etc.)
- Custom
WorkflowConfigfor fine-grained control
-
WorkflowTier enum: Processing strategy selection
STANDARD: Direct optimization for small datasets (< 100K points)CHUNKED: Memory-efficient chunked processing (100K - 10M points)STREAMING: Streaming optimization for huge datasets (> 10M points)STREAMING_CHECKPOINT: Streaming with automatic checkpointing
-
OptimizationGoal enum: Optimization objective specification
FAST: Minimum iterations, relaxed tolerancesROBUST: Multi-start with 5 starting pointsGLOBAL: Thorough global search with 20 startsMEMORY_EFFICIENT: Aggressive chunking, streaming fallbackQUALITY: Tight tolerances with validation passes
-
7 workflow presets: Ready-to-use configurations
fast,robust,global,memory_efficient,quality,hpc,streaming
-
YAML configuration: Load from
./nlsq.yamlwith environment variable overrides -
Cluster detection: HPC environment support with PBS Pro auto-detection
CI/CD Improvements
- Fixed Windows Unicode encoding for emoji output in example scripts
- Cross-platform temp paths using
tempfile.gettempdir() - Added missing test dependencies (
nbformat,pyyaml, etc.) for integration workflow
Documentation
- Migration guide:
docs/migration/curve_fit_to_fit.md - Complete Sphinx docs for workflow module
- 148 new tests for workflow system
Installation
pip install nlsq==0.3.4Quick Start
from nlsq import fit
import jax.numpy as jnp
def model(x, a, b):
return a * jnp.exp(-b * x)
# Automatic workflow selection
result = fit(model, x, y, p0=[1.0, 0.1])
# Or use presets
result = fit(model, x, y, p0=[1.0, 0.1], preset='robust')See CHANGELOG.md for full details.