Skip to content

Conversation

@donglaiw
Copy link
Collaborator

Summary of Changes
Phase 1: Backward Compatibility Code Removal (92 lines removed)
7 files modified:

callbacks.py - Removed old config style support

❌ Old: cfg.checkpoint.* and cfg.early_stopping.*
✅ New: cfg.monitor.checkpoint.* and cfg.monitor.early_stopping.*
lit_model.py - Removed legacy parameter conversions

❌ Legacy parameter conversion for decode_binary_contour_distance_watershed
❌ Fallback for output_scale/output_dtype → Only intensity_scale/intensity_dtype
build.py - Cleaned transform builders

❌ Removed backward compatibility comments
❌ Removed image_transform.resize fallback → Only data_transform.resize
regularization.py - Removed aliases

❌ BinaryReg, FgDTConsistency, ContourDTConsistency, etc.
visualizer.py - Removed legacy factory

❌ create_visualizer() factory function
hydra_config.py & hydra_utils.py - Removed deprecated comments

❌ "deprecated", "legacy", "backward compatibility" mentions
Phase 2: Legacy Config Field Removal (24 lines removed)
3 files modified:

hydra_config.py - Removed deprecated fields

❌ DataConfig.test_transpose → Use inference.data.test_transpose
❌ TestTimeAugmentationConfig.act → Use channel_activations
build.py - Removed fallback logic

❌ cfg.data.test_transpose fallback removed
✅ Only uses cfg.inference.data.test_transpose
lit_model.py - Removed single activation fallback

❌ Single act field fallback (18 lines)
✅ Requires modern channel_activations for TTA
Total Impact
116 lines removed (92 + 24)
10 files modified
3 commits pushed to claude/remove-backward-compatibility-01YXAHvH6ebTvvYLmfr18rZY
Breaking Changes
Users must now use the modern config structure:

✅ cfg.monitor.checkpoint.* for checkpointing
✅ cfg.monitor.early_stopping.* for early stopping
✅ cfg.data_transform.resize for resizing
✅ inference.data.test_transpose for test transpose
✅ channel_activations for TTA activations
✅ intensity_scale/intensity_dtype for postprocessing

claude and others added 4 commits November 14, 2025 17:01
- Remove backward compatibility mentions from migration steps
- Remove backward compatibility from success criteria
- Remove feature flags for backward compatibility from mitigation strategies
- Remove deprecation warnings from mitigation strategies
- Focus on clean, modern codebase without legacy concerns
Removes backward compatibility code and comments to maintain a clean, modern codebase:

**Config System (callbacks.py):**
- Remove old config style support for checkpoint callbacks
- Remove old config style support for early_stopping callbacks
- Keep only modern unified config style (cfg.monitor.*)

**Lightning Model (lit_model.py):**
- Remove legacy parameter conversion for decode_binary_contour_distance_watershed
- Remove legacy intensity_scale/output_scale fallbacks
- Keep only modern config names (intensity_scale, intensity_dtype)

**Transform Builders (build.py):**
- Remove backward compatibility comments
- Remove legacy image_transform.resize fallback
- Keep only modern data_transform.resize path

**Loss Functions (regularization.py):**
- Remove backward compatibility aliases (BinaryReg, FgDTConsistency, etc.)

**Utilities (visualizer.py):**
- Remove legacy create_visualizer() factory function

**Config (hydra_config.py, hydra_utils.py):**
- Remove deprecated config field comments
- Remove legacy path comments

**Impact:**
- 7 files modified
- 92 lines removed
- Clean, focused codebase without legacy support
Completely removes deprecated configuration fields instead of just comments:

**Removed Config Fields:**
1. `DataConfig.test_transpose` - Use `inference.data.test_transpose` instead
2. `TestTimeAugmentationConfig.act` - Use `channel_activations` instead

**Removed Fallback Logic:**
1. build.py: Remove cfg.data.test_transpose fallback (lines 262-263)
   - Now only uses cfg.inference.data.test_transpose
2. lit_model.py: Remove single activation fallback (lines 331-348)
   - Now requires channel_activations for TTA

**Impact:**
- 3 files modified
- 24 lines removed
- Breaking change: Old configs using deprecated fields will no longer work
- Users must update to modern config structure
@donglaiw donglaiw merged commit 435de70 into master Nov 14, 2025
0 of 14 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.

3 participants