Skip to content

Support partial preprocessing overrides in the Python API - #253

Merged
clemsgrs merged 2 commits into
mainfrom
agent/issue-246
Jul 28, 2026
Merged

Support partial preprocessing overrides in the Python API#253
clemsgrs merged 2 commits into
mainfrom
agent/issue-246

Conversation

@clemsgrs

Copy link
Copy Markdown
Owner

Summary

  • load segmentation, filtering, and preview defaults from the canonical packaged YAML configuration
  • deep-merge partial Python dictionaries so omitted nested fields retain package defaults
  • preserve the dynamic filtering reference tile size across model-derived preprocessing resolution
  • align the standard segmentation method and preview documentation with the public API
  • add exact regressions for default construction, every partial nested override, non-224 tile sizes, and omitted preprocessing reaching tiling

Root cause

The public dataclass represented nested preprocessing sections as empty or partial mappings, but downstream tiling treated each mapping as a complete constructor payload. This caused missing segmentation and preview fields before slide I/O. A first-pass static filtering default also failed to preserve the standard configuration's requested-tile-size interpolation for non-224 presets.

Impact

Python callers can now omit preprocessing entirely or override only the fields they need. Downstream hs2p configuration remains complete and aligned with the standard package configuration for 224, 256, and 448-pixel model presets.

Validation

  • focused acceptance regressions: 7 passed
  • tests/test_regression_core.py tests/test_regression_models.py tests/test_tiling_pipeline.py tests/test_output_consistency.py tests/test_progress.py: 155 passed, 1 skipped
  • tests/test_regression_inference.py: 148 passed
  • git diff --check
  • two-axis standards/spec review against main; all actionable findings fixed

Closes #246

@clemsgrs
clemsgrs merged commit 37ccc06 into main Jul 28, 2026
3 checks passed
@clemsgrs
clemsgrs deleted the agent/issue-246 branch July 28, 2026 14:23
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.

Support partial preprocessing overrides in the public Python API

1 participant