- Use signal.Signals(signum).name consistently in both api_server.py files
- Add fallback for unknown signals with Signal(n) format
- This ensures accurate signal name reporting in logs
Co-authored-by: Jiang-Jia-Jun <163579578+Jiang-Jia-Jun@users.noreply.github.com>
- Translate Chinese comments to English for consistency
- Add subprocess import to api_server.py for TimeoutExpired handling
- Improve signal name detection in worker_process.py using signal.Signals
- Add better docstring comments for signal handlers and cleanup functions
Co-authored-by: Jiang-Jia-Jun <163579578+Jiang-Jia-Jun@users.noreply.github.com>
- Added SIGINT/SIGTERM signal handlers in api_server.py (both OpenAI and simple versions)
- Added cleanup_processes() function to properly terminate worker processes
- Enhanced StandaloneApplication with worker exit hooks and cleanup
- Added signal handling in worker_process.py for graceful worker shutdown
- Added shutdown_event to coordinate graceful shutdown across threads
- Improved worker monitor to respect shutdown event
Co-authored-by: Jiang-Jia-Jun <163579578+Jiang-Jia-Jun@users.noreply.github.com>
* 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>