Skip to content

Conversation

@plusNew001
Copy link
Collaborator

Motivation

Modifications

Usage or Command

Accuracy Tests

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.

Copilot AI review requested due to automatic review settings November 10, 2025 02:33
@paddle-bot
Copy link

paddle-bot bot commented Nov 10, 2025

Thanks for your contribution!

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR modifies the test validation logic in the VL (Vision-Language) model test to be more flexible. Instead of requiring an exact match with the expected response, it now checks if the key information is contained within the response.

Key Changes:

  • Updated the expected response string to contain only the core information ("北魏时期") instead of the full formatted response
  • Changed assertion from exact equality check to substring containment check

service_http_port = "8188" # 服务配置的
client = openai.Client(base_url=f"http://{ip}:{service_http_port}/v1", api_key="EMPTY_API_KEY")
base_response = "\n\n这尊佛像属于**北魏时期**"
base_response = "北魏时期"
Copy link

Copilot AI Nov 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

变量名 base_response 不够准确。既然现在它只包含关键信息而不是完整响应,建议重命名为 expected_keywordexpected_content 以更好地反映其用途。

Copilot generated this review using guidance from repository custom instructions.
print(response.choices[0].message.content)
# print(base_response)
assert response.choices[0].message.content == base_response
assert base_response in response.choices[0].message.content
Copy link

Copilot AI Nov 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

断言缺少错误消息。建议添加描述性错误消息以便在测试失败时更容易调试,例如:assert base_response in response.choices[0].message.content, f\"Expected '{base_response}' not found in response: {response.choices[0].message.content}\"

Copilot generated this review using guidance from repository custom instructions.
@plusNew001 plusNew001 merged commit 0a3bc84 into PaddlePaddle:develop Nov 10, 2025
18 of 20 checks passed
@plusNew001 plusNew001 deleted the vl-bug-fix-dev branch November 13, 2025 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants