* Add tests for openai api_server coverage
* update
* Update tests for openai api_server
* fix bugs
* test: disable some api_server lifespan/controller tests for local env
* Format test_api_server with black
* update
* update
* test: narrow envs patch in api_server tests to avoid side effects
* fix: separate MagicMock creation to avoid missing req argument
* fix: patch TRACES_ENABLE env var in api_server tests
* fix: use os.environ patch for TRACES_ENABLE
* test: use fake fastdeploy.envs in api_server tests
* test: pass fake Request into chat/completion routes
* test: increase coverage for tracing and scheduler control
* fix: set dynamic_load_weight in tracing headers test
* ci: add retry and validation for FastDeploy.tar.gz download
* ci: fix indentation in _base_test.yml
* refactor: simplify test_api_server.py (807->480 lines, ~40% reduction)
* fix: restore missing args attributes (revision, etc.) in _build_args
* fix: patch sys.argv to prevent SystemExit: 2 in api_server tests
* improve coverage
* Remove docstring from test_api_server.py
Removed unnecessary docstring from test_api_server.py
---------
Co-authored-by: CSWYF3634076 <wangyafeng@baidu.com>
* [Metax] update ci name
* Update CI_METAX workflow for pull request handling
* Update ci_metax.yml
* Update CI_METAX workflow for pull request handling
* Remove commented-out code in run_ci_metax.sh
* Add environment to Jenkins trigger job
* Change trigger event from pull_request_target to pull_request
* Fix environment name casing in CI workflow
* Change environment name from Metax-ci to Metax_ci
* Modify CI_METAX workflow for PR targeting and concurrency
Updated workflow to use pull_request_target event and added concurrency settings.
---------
Co-authored-by: Jiaxin Sui <95567040+plusNew001@users.noreply.github.com>
* Add unit tests for TokenProcessor functionality
* Add trace stubs for token processor tests
* Increase token processor test coverage
* Clean up imports in test_token_processor.py
Remove unnecessary path manipulation in test file.
* Cleanup: Remove unused imports in test_token_processor
Removed unused imports from the test file.
* Add trace_carrier to task in test cases
Added trace_carrier attribute to task in multiple test cases to ensure proper handling of trace information.
* Refine token processor tests for safe coverage
* Expand postprocess coverage
* Add ZMQ logprob parsing test
---------
Co-authored-by: CSWYF3634076 <wangyafeng@baidu.com>
Co-authored-by: Tao Luo <luotao02@baidu.com>
* Enhance run_ci_xpu.sh with caching and prefill options
* Update model path and configuration in run_ci_xpu.sh
* Add '北朝' keyword to assertion in run_45vl.py
* Enhance process termination logic in run_ci_xpu.sh
* Set timeout for CI_XPU job to 60 minutes
* Remove extra newline in stop_processes function
* Update paddlepaddle-xpu installation command
Comment out the previous paddlepaddle-xpu installation command and replace it with a specific version installation due to EP parallel error.
* Update PaddlePaddle installation command
* Remove max_tokens from model response configuration
Removed max_tokens parameter from the model response call.
* [rl] provide options for whether shutdown comm group after weights cleared
* [fix] fix args hardcode
* [fix] change args type
* [fix] add worker process args
* Add tests for global scheduler functionality
This file contains tests for the global scheduler, including request handling, load accounting, and response management.
* Enhance global scheduler unit tests
* Clean up comments in test_global_scheduler.py
Removed unnecessary comments and coverage instructions.
* Update tests/scheduler/test_global_scheduler.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update tests/scheduler/test_global_scheduler.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update tests/scheduler/test_global_scheduler.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update tests/scheduler/test_global_scheduler.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Translate comments and docstrings to Chinese
Updated comments and docstrings in Chinese to enhance clarity for native speakers.
* Use monkeypatch for FD_ENABLE_MAX_PREFILL in tests
Replaced direct assignment with monkeypatching for FD_ENABLE_MAX_PREFILL in test cases.
* Correct test function definitions in test_global_scheduler
Fix function definitions and update test cases for scheduler.
* Fix typos in global scheduler tests
* Translate comments to English in test_global_scheduler.py
Updated comments and docstrings in test_global_scheduler.py from Chinese to English for better clarity and consistency.
---------
Co-authored-by: CSWYF3634076 <wangyafeng@baidu.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Jiaxin Sui <95567040+plusNew001@users.noreply.github.com>
* Add pooler unit tests
* Refine pooler tests import handling
* Refactor pooler tests to use real modules
* Clean up test_pooler.py by removing docstring
Removed unnecessary docstring and cleaned up code.
* Clean up imports in test_pooler.py
Removed unnecessary import of sys and related path adjustments.
* Update model config and clean up test code
* Update test_pooler.py
---------
Co-authored-by: CSWYF3634076 <wangyafeng@baidu.com>
* Add rollout model unit tests
* test: update rl rollout_model tests
* test: fix cache_type_branches unsupported platform case
* test: fix rl rollout_model test indent
* Delete tests/spec_decode/test_mtp_proposer.py
* chore: format test_rollout_model
* chore: translate rollout test comments to English
* test: guard rollout_model import by disabling auto registry
* chore: reorder imports in rl rollout test
* test: isolate env for RL rollout tests
* style: format rollout RL tests with black
* update
* test: remove RL rollout unit tests causing collection issues
* test: add lightweight rollout_model RL unit tests
* fix(coverage): filter test file paths and handle collection failures
- Only extract real test file paths (tests/.../test_*.py) from pytest collect output
- Filter out ERROR/collecting prefixes to prevent garbage in failed_tests.log
- Add proper error handling for pytest collection failures
- Exit early if no test files can be extracted
- Preserve collection error output for debugging
* update
* style: fix code style issues in test_rollout_model.py
- Remove unused 'os' import
- Remove trailing blank lines
---------
Co-authored-by: YuBaoku <49938469+EmmonsCurse@users.noreply.github.com>
* Implement test for MTP accept ratio
Add test for MTP accept ratio with assertions on results and metrics.
* Update test_ernie_21b_mtp.py
* Refactor test_mtp_accept_ratio for baseline comparison
Refactor test_mtp_accept_ratio to compare results against baseline file and metrics.
* Fix formatting issues in test_ernie_21b_mtp.py
---------
Co-authored-by: YuBaoku <49938469+EmmonsCurse@users.noreply.github.com>