Skip to content

refactor: relocate configs and enforce import rules#158

Merged
Frankstein73 merged 3 commits into
devfrom
refactor/config-imports
Jan 2, 2026
Merged

refactor: relocate configs and enforce import rules#158
Frankstein73 merged 3 commits into
devfrom
refactor/config-imports

Conversation

@dest1n1s
Copy link
Copy Markdown
Member

@dest1n1s dest1n1s commented Jan 1, 2026

This PR refactors the configuration structure, making config classes live alongside the methods and classes that consume them. It also enforces a strict rule set for internal module imports to ensure consistency:

  • Top-level modules (e.g., trainer.py): Must use absolute imports.
  • Submodules (e.g., factory.py): Use absolute imports for dependencies outside the submodule, and relative imports for internal references. Parent directory traversal (e.g., from ..module import) is prohibited.
  • __init__.py files: Must always use relative imports.
  • Internal code within lm_saes must use fully qualified paths. External code (e.g., server or tests) is permitted to import directly from the root lm_saes package.

@dest1n1s dest1n1s requested a review from Frankstein73 January 1, 2026 13:43
@Frankstein73 Frankstein73 merged commit b7a121d into dev Jan 2, 2026
4 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.

2 participants