[CI] 【Hackathon 9th Sprint No.24】NO.24 功能模块单测补充 by xunyoyo · Pull Request #5055 · PaddlePaddle/FastDeploy (original) (raw)
@luotao1 @YuanRisheng
同样在 pr action 检查过程中 api 调用出现了问题,导致报错停止。
Running pytest file: tests/e2e/test_ernie_03b_pd_router_v0.py ============================= test session starts ============================== platform linux -- Python 3.10.13, pytest-9.0.1, pluggy-1.6.0 -- /usr/local/bin/python cachedir: .pytest_cache rootdir: /workspace/FastDeploy/tests configfile: cov_pytest.ini plugins: asyncio-1.3.0, respx-0.22.0, anyio-4.9.0 asyncio: mode=strict, debug=False, asyncio_default_fixture_loop_scope=None, asyncio_default_test_loop_scope=function collecting ... collected 5 items
tests/e2e/test_ernie_03b_pd_router_v0.py::test_metrics_config Pre-test port cleanup... Cleaning ports: [8688, 8658, 8678, 8698, 8638, 8689, 8659, 8679, 8699, 8639, 8648] log dir clean model_path: /ModelData/ERNIE-4.5-0.3B-Paddle start router... start prefill... start decode... Prefill and decode servers are both online PASSED tests/e2e/test_ernie_03b_pd_router_v0.py::test_chat_usage_stream 🟢 接收响应中...
Decode Response: 牛顿的三大运动定律是牛顿力学的基本原理,它们是描述物体运动和力的关系的基础。以下是这三条定律的详细解释:
一、牛顿第一定律(惯性定律)
定义:牛顿第一 PASSED tests/e2e/test_ernie_03b_pd_router_v0.py::test_chat_usage_non_stream 🟢 接收响应中...
PASSED tests/e2e/test_ernie_03b_pd_router_v0.py::test_non_chat_usage_stream 🟢 接收响应中...
Decode Response:
解答
牛顿的三大运动定律是:
- 惯性定律:物体保持静止或匀速直线运动状态的性质,即惯性。
- 万有引力定律: PASSED tests/e2e/test_ernie_03b_pd_router_v0.py::test_non_chat_usage_non_stream 🟢 接收响应中...
Decode Response:
解答
牛顿的三大运动定律是:
- 惯性定律:物体保持静止或匀速直线运动状态的性质,即惯性。
- 万有引力定律: PASSED ===== Post-test server cleanup... ===== Cleaning ports: [8688, 8658, 8678, 8698, 8638, 8689, 8659, 8679, 8699, 8639, 8648] Killed process on port 8658, pid=8672 Killed process on port 8659, pid=8811 Prefill server (pid=8672) terminated Decode server (pid=8811) terminated
/usr/local/lib/python3.10/site-packages/coverage/control.py:950: CoverageWarning: No data was collected. (no-data-collected); see https://coverage.readthedocs.io/en/7.11.3/messages.html#warning-no-data-collected self._warn("No data was collected.", slug="no-data-collected") ============================== 5 passed in 46.41s ============================== Running pytest file: tests/e2e/test_ernie_03b_pd_splitwise_scheduler.py ============================= test session starts ============================== platform linux -- Python 3.10.13, pytest-9.0.1, pluggy-1.6.0 -- /usr/local/bin/python cachedir: .pytest_cache rootdir: /workspace/FastDeploy/tests configfile: cov_pytest.ini plugins: asyncio-1.3.0, respx-0.22.0, anyio-4.9.0 asyncio: mode=strict, debug=False, asyncio_default_fixture_loop_scope=None, asyncio_default_test_loop_scope=function collecting ... collected 5 items
tests/e2e/test_ernie_03b_pd_splitwise_scheduler.py::test_metrics_config Pre-test port cleanup... Cleaning ports: [8688, 8658, 8678, 8698, 8638, 8689, 8659, 8679, 8699, 8639, 8533] log dir clean model_path: /ModelData/ERNIE-4.5-0.3B-Paddle start redis... start prefill... start decode... Prefill server is up on port 8688 Decode server is up on port 8689 PASSED tests/e2e/test_ernie_03b_pd_splitwise_scheduler.py::test_chat_usage_stream 🟢 接收响应中...
Decode Response: 牛顿的三大运动定律是牛顿力学的基本原理,它们是描述物体运动和力的关系的基础。以下是这三条定律的详细解释:
一、牛顿第一定律(惯性定律)
定义:牛顿第一 PASSED tests/e2e/test_ernie_03b_pd_splitwise_scheduler.py::test_chat_usage_non_stream ❌ 请求超时(超过 600 秒) FAILED tests/e2e/test_ernie_03b_pd_splitwise_scheduler.py::test_non_chat_usage_stream 🟢 接收响应中...
PASSED tests/e2e/test_ernie_03b_pd_splitwise_scheduler.py::test_non_chat_usage_non_stream 🟢 接收响应中...
PASSED ===== Post-test server cleanup... ===== Cleaning ports: [8688, 8658, 8678, 8698, 8638, 8689, 8659, 8679, 8699, 8639, 8533] Killed process on port 8658, pid=10328 Killed process on port 8658, pid=10404 Prefill server (pid=10328) terminated Decode server (pid=10404) terminated
=================================== FAILURES =================================== __________________________ test_chat_usage_non_stream __________________________
api_url = ('http://0.0.0.0:8688/v1/chat/completions', 'http://0.0.0.0:8689/v1/chat/completions')
def test_chat_usage_non_stream(api_url):
"""测试非流式chat usage"""
payload = {
"model": "default",
"temperature": 0,
"top_p": 0,
"seed": 33,
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "牛顿的三大运动定律是什么?"},
],
"max_tokens": 50,
"stream": False,
"metadata": {"min_tokens": 10},
}
p_url, d_url = api_urlresponse = send_request(url=p_url, payload=payload).json()E AttributeError: 'NoneType' object has no attribute 'json'
tests/e2e/test_ernie_03b_pd_splitwise_scheduler.py:366: AttributeError
我的已通过
Running pytest file: tests/model_executor/test_tp_utils.py ============================= test session starts ============================== platform linux -- Python 3.10.13, pytest-9.0.1, pluggy-1.6.0 -- /usr/local/bin/python cachedir: .pytest_cache rootdir: /workspace/FastDeploy/tests configfile: cov_pytest.ini plugins: asyncio-1.3.0, respx-0.22.0, anyio-4.9.0 asyncio: mode=strict, debug=False, asyncio_default_fixture_loop_scope=None, asyncio_default_test_loop_scope=function collecting ... collected 26 items
tests/model_executor/test_tp_utils.py::CheckTensorParallelPrerequisitesTest::test_inconsistent_tensor_parallel_keys_logs_error PASSED tests/model_executor/test_tp_utils.py::CheckTensorParallelPrerequisitesTest::test_missing_tensor_parallel_map_logs_error PASSED tests/model_executor/test_tp_utils.py::CheckTensorParallelPrerequisitesTest::test_tensor_parallel_disabled_noop PASSED tests/model_executor/test_tp_utils.py::CheckTensorParallelPrerequisitesTest::test_tensor_parallel_mappings_populated PASSED tests/model_executor/test_tp_utils.py::HelperFunctionTest::test_extract_placeholders PASSED tests/model_executor/test_tp_utils.py::HelperFunctionTest::test_extract_prefix_variants PASSED tests/model_executor/test_tp_utils.py::HelperFunctionTest::test_has_placeholders PASSED tests/model_executor/test_tp_utils.py::HelperFunctionTest::test_has_prefix PASSED tests/model_executor/test_tp_utils.py::HelperFunctionTest::test_safe_dict_preserves_unknown PASSED tests/model_executor/test_tp_utils.py::HelperFunctionTest::test_update_final_actions_formats_keys PASSED tests/model_executor/test_tp_utils.py::BuildExpandedKeysTest::test_ffn_layer_id_requires_start PASSED tests/model_executor/test_tp_utils.py::BuildExpandedKeysTest::test_invalid_placeholder_raises PASSED tests/model_executor/test_tp_utils.py::BuildExpandedKeysTest::test_layer_id_placeholder PASSED tests/model_executor/test_tp_utils.py::BuildExpandedKeysTest::test_moe_layer_and_expert_id PASSED tests/model_executor/test_tp_utils.py::BuildExpandedKeysTest::test_moe_layer_and_image_expert_id PASSED tests/model_executor/test_tp_utils.py::BuildExpandedKeysTest::test_moe_layer_and_text_expert_id PASSED tests/model_executor/test_tp_utils.py::BuildExpandedKeysTest::test_moe_layer_only PASSED tests/model_executor/test_tp_utils.py::BuildExpandedKeysTest::test_no_placeholder_keys_pass_through PASSED tests/model_executor/test_tp_utils.py::GQATensorOpsTest::test_gqa_merge_reconstructs_weights PASSED tests/model_executor/test_tp_utils.py::GQATensorOpsTest::test_gqa_split_on_matrix_rows PASSED tests/model_executor/test_tp_utils.py::GQATensorOpsTest::test_gqa_split_returns_all_partitions PASSED tests/model_executor/test_tp_utils.py::GQATensorOpsTest::test_gqa_split_with_rank_and_repeat_kv PASSED tests/model_executor/test_tp_utils.py::GQATensorOpsTest::test_split_or_merge_func_v1_default_path PASSED tests/model_executor/test_tp_utils.py::GQATensorOpsTest::test_split_or_merge_func_v1_gqa_path PASSED tests/model_executor/test_tp_utils.py::GQATensorOpsTest::test_split_or_merge_func_v1_row_bias PASSED tests/model_executor/test_tp_utils.py::GQATensorOpsTest::test_split_or_merge_qkv_dispatch PASSED
============================== 26 passed in 0.16s ==============================