This PR introduces significant improvements to the TensorContainer type system and documentation, along with a new symlog distribution implementation:
- Enhanced type system: Added DeviceLike and ShapeLike type aliases for consistent typing across the codebase, replacing internal PyTorch types with
public API equivalents
- Comprehensive documentation: Added detailed design decisions document explaining TensorContainer architecture, batch/event dimension separation, PyTree
integration, and performance optimization strategies• New symlog distribution: Implemented SymLogDistribution with bijective SymexpTransform for
modeling data with wide dynamic ranges
- Improved validation: Refactored tensor container initialization to always validate by default, removing the validate_args parameter
• Better PyTree integration: Enhanced metadata preservation during pytree operations and improved nested container interaction tests
- Device resolution improvements: Streamlined device compatibility logic with better error handling