Skip to content

Conversation

@essos-bot
Copy link
Contributor

Motivation

NO.55 功能模块 fastdeploy/scheduler/local_scheduler.py 单测补充

Modifications

NO.55 功能模块 fastdeploy/scheduler/local_scheduler.py 单测补充

Usage or Command

no need

Accuracy Tests

no

Checklist

  • Add at least a tag in the PR title.
    • Tag list: [[FDConfig],[APIServer],[Engine], [Scheduler], [PD Disaggregation], [Executor], [Graph Optimization], [Speculative Decoding], [RL], [Models], [Quantization], [Loader], [OP], [KVCache], [DataProcessor], [BugFix], [Docs], [CI], [Optimization], [Feature], [Benchmark], [Others], [XPU], [HPU], [GCU], [DCU], [Iluvatar], [Metax]]
    • You can add new tags based on the PR content, but the semantics must be clear.
  • Format your code, run pre-commit before commit.
  • Add unit tests. Please write the reason in this PR if no unit tests.
  • Provide accuracy results.
  • If the current PR is submitting to the release branch, make sure the PR has been submitted to the develop branch, then cherry-pick it to the release branch with the [Cherry-Pick] PR tag.

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](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@paddle-bot
Copy link

paddle-bot bot commented Nov 15, 2025

Thanks for your contribution!

@paddle-bot paddle-bot bot added the contributor External developers label Nov 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor External developers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant