Skip to content

refactor(design): mid-level design pass#89

Merged
johnmarktaylor91 merged 1 commit intomainfrom
refactor/mid-level-design
Mar 3, 2026
Merged

refactor(design): mid-level design pass#89
johnmarktaylor91 merged 1 commit intomainfrom
refactor/mid-level-design

Conversation

@johnmarktaylor91
Copy link
Copy Markdown
Owner

Summary

  • Replace implicit parameter clusters with explicit dataclasses (FuncExecutionContext, VisualizationOverrides, IsomorphicExpansionState, ModuleParamInfo) — cuts 3-6 params from 15+ function signatures
  • Decompose 100+ line functions into coordinator + helpers across capture pipeline, model prep, finalization, and labeling
  • Extract shared patterns: _traverse_model_modules visitor, _tag_untagged_buffers, _create_session_param_logs
  • No public API changes, no file moves, no class renames

Test plan

  • 471 non-slow tests pass (pytest tests/ -m "not slow" --ignore=tests/test_real_world_models.py)
  • Import verification (import torchlens)
  • Code reviewer agent verified all modified functions in isolation
  • Run real-world model tests before merge

… parameter bundles

Replace implicit parameter clusters with explicit dataclasses
(FuncExecutionContext, VisualizationOverrides, IsomorphicExpansionState,
ModuleParamInfo), decompose 100+ line functions into coordinator + helpers,
and extract shared patterns (model traversal visitor, buffer tagging).

No public API changes. All 471 non-slow tests pass.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@johnmarktaylor91 johnmarktaylor91 merged commit 7177a8f into main Mar 3, 2026
1 check passed
@johnmarktaylor91 johnmarktaylor91 deleted the refactor/mid-level-design branch March 3, 2026 19:51
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.

1 participant