Skip to content

refactor: Move to specs/, use Protocols and backend attribute to enforce consistency, more SL layer types to abstract#10

Open
JulianSlzr wants to merge 3 commits intomlxfrom
mlx-steppable-typing
Open

refactor: Move to specs/, use Protocols and backend attribute to enforce consistency, more SL layer types to abstract#10
JulianSlzr wants to merge 3 commits intomlxfrom
mlx-steppable-typing

Conversation

@JulianSlzr
Copy link
Copy Markdown
Collaborator

@JulianSlzr JulianSlzr commented Apr 2, 2026

  • Make Steppable, Stateless, etc. abstract
  • Rename abstract/ to spec/ to capture the unified role of signatures and unit tests
  • Rename _test_base to _behaviors
  • Require training parameter across all backend calls (FYI @KEHANG)
  • Add explicit unit tests for default mixin alias behaviors in specs/types_behaviors.py, e.g. PreservesShapeTest
  • "tensor" --> "array" in comments
  • Modernize requirements (3.13 for generics) and typechecker (pyrefly)

…to MLX, sync comments

- Require training parameter across all backend calls
- Add explicit get_output_dtype abstract method
- Refine Steppable generic type aliases
- Add explicit unittesting for default mixin alias behaviors in abstract/types_test_base.py
@JulianSlzr JulianSlzr requested a review from rryan April 2, 2026 00:18
@JulianSlzr JulianSlzr force-pushed the mlx-steppable-typing branch from b1f63d9 to 1868fc0 Compare April 3, 2026 17:21
@JulianSlzr JulianSlzr changed the title refactor(types.py): add SL layer types to abstract, require training args, sync comments refactor: Move to specs/, use Protocols and backend attribute to enforce consistency, more SL layer types to abstract Apr 3, 2026
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