Skip to content

[XPU][CI] fix ci case bug#5084

Merged
plusNew001 merged 14 commits intoPaddlePaddle:developfrom
plusNew001:ci-update
Nov 17, 2025
Merged

[XPU][CI] fix ci case bug#5084
plusNew001 merged 14 commits intoPaddlePaddle:developfrom
plusNew001:ci-update

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 17, 2025 07:13
@paddle-bot
Copy link

paddle-bot bot commented Nov 17, 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 fixes a bug in the XPU CI test case for the 45VL model. The change updates the assertion logic to be more flexible by checking for any of multiple possible keywords in the response instead of a single hardcoded value.

Key changes:

  • Removed the hardcoded base_response variable
  • Updated assertion to check for multiple acceptable keywords in the model response

print(response.choices[0].message.content)
# print(base_response)
assert base_response in response.choices[0].message.content
assert any(keyword in response.choices[0].message.content for keyword in ["北魏", "北齐", "释迦牟尼"])
Copy link

Copilot AI Nov 17, 2025

Choose a reason for hiding this comment

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

The function assertany does not exist in Python. This should be assert any(...) to properly check if any of the keywords exists in the response content.

Copilot uses AI. Check for mistakes.
print(response.choices[0].message.content)
# print(base_response)
assert base_response in response.choices[0].message.content
assert any(keyword in response.choices[0].message.content for keyword in ["北魏", "北齐", "释迦牟尼"])
Copy link

Copilot AI Nov 17, 2025

Choose a reason for hiding this comment

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

The assertion lacks an error message. Consider adding a descriptive message to help diagnose test failures: assert any(keyword in response.choices[0].message.content for keyword in [\"北魏\", \"北齐\", \"释迦牟尼\"]), f\"Expected one of ['北魏', '北齐', '释迦牟尼'] in response, but got: {response.choices[0].message.content}\"

Suggested change
assert any(keyword in response.choices[0].message.content for keyword in ["北魏", "北齐", "释迦牟尼"])
assert any(keyword in response.choices[0].message.content for keyword in ["北魏", "北齐", "释迦牟尼"]), \
f"Expected one of ['北魏', '北齐', '释迦牟尼'] in response, but got: {response.choices[0].message.content}"

Copilot uses AI. Check for mistakes.
@plusNew001 plusNew001 merged commit 7f94d77 into PaddlePaddle:develop Nov 17, 2025
11 of 14 checks passed
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