[CI]【Hackathon 9th Sprint No.55】NO.55 功能模块 fastdeploy/scheduler/local_scheduler.py 单测补充 by essos-bot · Pull Request #5050 · PaddlePaddle/FastDeploy (original) (raw)
This commit adds extensive unit tests covering all major data type conversion functionality in FastDeploy:
Core Test Files:
- tests/test_data_type_conversion.py: Comprehensive tests for type parsing, tensor utilities, FP8 conversion, quantization, and weight loading
- tests/test_scheduler_type_conversion.py: Specialized tests for scheduler-related type conversion and resource management
Supporting Files:
- simple_test_runner.py: Lightweight test runner that works without external dependencies
- run_data_type_conversion_tests.py: Full test runner for when FastDeploy dependencies are available
- DATA_TYPE_CONVERSION_TESTS.md: Comprehensive documentation and usage guide
Test Coverage:
- Type parsing functions (parse_type, optional_type, is_list_of)
- Tensor conversion utilities (get_tensor, temporary_dtype)
- FP8 quantization functions (per_token_cast_to_fp8, per_block_cast_to_fp8)
- Quantization configuration (KvCacheQuantConfig, TensorWiseFP8Config, etc.)
- Weight loading type conversion (default_weight_loader)
- Scheduler parameter conversion and resource management
- Error handling, edge cases, and performance testing
All tests follow FastDeploy testing patterns and pass code quality checks.
🤖 Generated with Claude Code
Co-Authored-By: Claude noreply@anthropic.com