Files
foxhunt/docs/codebase-cleanup/wave28_3_report.txt
jgrusewski 2df1ea92e1 feat(ml): WAVE 29 DQN Codebase Cleanup & Refactoring Campaign
BREAKING CHANGES:
- Removed orphaned dqn.rs monolithic trainer (4,975 lines)
- Removed orphaned dqn_ensemble.rs module (816 lines)
- Removed orphaned tft.rs and tft_complete_int8_integration_test.rs
- TFT trainer split into modular directory structure

DQN Module Refactoring:
- Split trainers/dqn.rs into modular structure (config.rs, statistics.rs, trainer.rs)
- Fixed hyperopt 39D search space (continuous params only)
- Boolean flags (use_dueling, use_double_dqn, use_per, use_noisy_nets) are now FIXED architectural decisions
- use_distributional defaults to false (Candle BUG #36 - scatter_add gradient issues)

Clean Module Structure:
- ml/src/trainers/dqn/ directory with proper mod.rs exports
- ml/src/trainers/tft/ directory with config.rs, types.rs, model.rs, trainer.rs, tests.rs
- All P0 features validated: TD-error clamping, batch diversity, LR scheduler, priority staleness

Documentation:
- Added comprehensive docs in docs/codebase-cleanup/
- ADR-001 for DQN refactoring decisions
- Rainbow DQN component matrix and quick reference guides

Build Status: Compiles with zero errors

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 23:46:13 +01:00

87 lines
3.2 KiB
Plaintext

# WAVE 28.3: Import Update Summary
## Task Completed
Updated all imports from `WorkingDQN`/`WorkingDQNConfig` to `DQN`/`DQNConfig` and removed deprecated `config_2025` and `demo_2025_dqn` modules.
## Files Changed
### Core DQN Files
1. `/home/jgrusewski/Work/foxhunt/ml/src/lib_test.rs`
- Changed: `WorkingDQN` → `DQN`
- Changed: `WorkingDQNConfig` → `DQNConfig`
2. `/home/jgrusewski/Work/foxhunt/ml/src/dqn/mod.rs`
- Removed: `pub mod demo_2025_dqn;`
- Removed: `pub mod config_2025;`
- Removed: Re-exports of `config_2025` functions
- Updated: `pub use dqn::{DQN, DQNConfig}`
- Removed: Duplicate `DQNConfig` from agent module export
3. `/home/jgrusewski/Work/foxhunt/ml/src/dqn/regime_conditional.rs`
- Changed: `WorkingDQN` → `DQN` (7 occurrences)
- Changed: `WorkingDQNConfig` → `DQNConfig` (4 occurrences)
- Updated documentation examples
4. `/home/jgrusewski/Work/foxhunt/ml/src/dqn/ensemble.rs`
- Changed: `WorkingDQN` → `DQN` (5 occurrences)
- Changed: `WorkingDQNConfig` → `DQNConfig` (4 occurrences)
- Updated documentation examples
5. `/home/jgrusewski/Work/foxhunt/ml/src/dqn/distributional_dueling.rs`
- Changed: Comment from `WorkingDQNConfig` → `DQNConfig`
6. `/home/jgrusewski/Work/foxhunt/ml/src/dqn/dueling.rs`
- Changed: Comment from `WorkingDQNConfig` → `DQNConfig`
### Adapter & Benchmark Files
7. `/home/jgrusewski/Work/foxhunt/ml/src/dqn/trainable_adapter.rs`
- Changed: `WorkingDQN` → `DQN` (6 occurrences)
- Changed: `WorkingDQNConfig` → `DQNConfig` (6 occurrences)
- Updated all documentation references
8. `/home/jgrusewski/Work/foxhunt/ml/src/benchmark/dqn_benchmark.rs`
- Changed: `WorkingDQN` → `DQN` (4 occurrences)
- Changed: `WorkingDQNConfig` → `DQNConfig` (2 occurrences)
- Updated model_name from "WorkingDQN" to "DQN"
### Trainer Files
9. `/home/jgrusewski/Work/foxhunt/ml/src/trainers/dqn/config.rs`
- Changed: `WorkingDQN` → `DQN` (3 occurrences)
- Updated comments referencing `WorkingDQNConfig`
10. `/home/jgrusewski/Work/foxhunt/ml/src/trainers/dqn/trainer.rs`
- Changed: `WorkingDQN` → `DQN` (2 occurrences)
- Changed: `WorkingDQNConfig` → `DQNConfig` (2 occurrences)
11. `/home/jgrusewski/Work/foxhunt/ml/src/trainers/dqn_ensemble.rs`
- Changed: `WorkingDQN` → `DQN` (3 occurrences)
- Changed: `WorkingDQNConfig` → `DQNConfig` (1 occurrence)
### Hyperopt Files
12. `/home/jgrusewski/Work/foxhunt/ml/src/hyperopt/adapters/dqn.rs`
- Changed: All references automatically via sed
## Changes Summary
### Replacements Made
- **WorkingDQN** → **DQN**: 35+ occurrences
- **WorkingDQNConfig** → **DQNConfig**: 30+ occurrences
### Modules Deprecated
- `ml/src/dqn/config_2025.rs` - Commented out in mod.rs
- `ml/src/dqn/demo_2025_dqn.rs` - Commented out in mod.rs
### Build Status
✅ **SUCCESS**: `cargo check --package ml` completes without errors
- Only warnings (unused imports, deprecated types in other modules)
- No compilation errors
- All refactored code compiles cleanly
## Next Steps
The codebase now consistently uses:
- `DQN` instead of `WorkingDQN`
- `DQNConfig` instead of `WorkingDQNConfig`
- Main dqn module instead of deprecated config_2025 module
All imports have been updated and the code compiles successfully.