Skip to content

multi item scoring testcase#225

Merged
cherryblo merged 23 commits intoAscend:testcasesfrom
shun8686:xyf-MIS-pr
Apr 6, 2026
Merged

multi item scoring testcase#225
cherryblo merged 23 commits intoAscend:testcasesfrom
shun8686:xyf-MIS-pr

Conversation

@EdwardXuy
Copy link
Copy Markdown

@EdwardXuy EdwardXuy commented Apr 3, 2026

[Ascend] Add multi-item scoring tests for NPU basic functionality

Summary:
This commit introduces comprehensive test cases for multi-item scoring
functionality on Ascend NPU, ensuring correct behavior of softmax scoring
and parameter handling in SGLang's Ascend backend.

Test File Added:

test_npu_multi_item_scoring_softmax.py

Validates semantic correctness of multi-item scoring
Verifies that "Yes" token receives higher scores for positive queries
Tests basic scoring pipeline with tokenized input
Tests apply_softmax=False vs apply_softmax=True parameter distinction
Verifies softmax probability normalization (scores sum to 1.0)
Covers both tokenized and text input scenarios
test_ascend_utils.py (Helper)

Provides utility functions for Ascend NPU test setup
Includes server management and scoring helper methods
Key Validations:
✓ apply_softmax=False returns raw logits
✓ apply_softmax=True returns normalized probabilities (sum = 1.0)
✓ Correct token ranking for semantic scoring
✓ All tests pass on Ascend 910B with CANN 8.5.0

Test Results:

test_npu_multi_item_scoring_softmax.py: 3/3 passed
Total: 3/3 tests passed
Related:

Improves test coverage for Ascend NPU scoring functionality
Enables CI validation for multi-item scoring parameters

EdwardXuy and others added 11 commits March 31, 2026 17:56
Adds a function to send scoring requests to the server.
Implement tests for multi-item scoring with softmax options.
This test verifies the multi-item scoring functionality with text input and softmax normalization. It checks response structure, score ordering, and ensures the correct item is ranked highest.
@ascend-robot
Copy link
Copy Markdown

CLA Signature Guide

@EdwardXuy , thanks for your pull request.

The following commit(s) are not associated with a signed Contributor License Agreement (CLA).

Commit Reason
0b9fff2a Implement send_score_request fun... the email used in the commit is not linked to a signed CLA!
please verify that it matches the email you used when signing the CLA.
34ceebe0 CI Lint the email used in the commit is not linked to a signed CLA!
please verify that it matches the email you used when signing the CLA.

To sign CLA, click here.

To check if your email is configured correctly, refer to the FAQs.

Once you've signed the CLA or updating your email, please comment /check-cla to revalidate CLA status.

@github-actions github-actions Bot added the npu label Apr 3, 2026
@EdwardXuy EdwardXuy marked this pull request as draft April 3, 2026 12:00
@ascend-robot
Copy link
Copy Markdown

CLA Signature Guide

@EdwardXuy , thanks for your pull request.

The following commit(s) are not associated with a signed Contributor License Agreement (CLA).

Commit Reason
0b9fff2a Implement send_score_request fun... the email used in the commit is not linked to a signed CLA!
please verify that it matches the email you used when signing the CLA.
34ceebe0 CI Lint the email used in the commit is not linked to a signed CLA!
please verify that it matches the email you used when signing the CLA.

To sign CLA, click here.

To check if your email is configured correctly, refer to the FAQs.

Once you've signed the CLA or updating your email, please comment /check-cla to revalidate CLA status.

@ascend-robot
Copy link
Copy Markdown

CLA Signature Guide

@EdwardXuy , thanks for your pull request.

The following commit(s) are not associated with a signed Contributor License Agreement (CLA).

Commit Reason
0b9fff2a Implement send_score_request fun... the email used in the commit is not linked to a signed CLA!
please verify that it matches the email you used when signing the CLA.
34ceebe0 CI Lint the email used in the commit is not linked to a signed CLA!
please verify that it matches the email you used when signing the CLA.

To sign CLA, click here.

To check if your email is configured correctly, refer to the FAQs.

Once you've signed the CLA or updating your email, please comment /check-cla to revalidate CLA status.

@EdwardXuy EdwardXuy marked this pull request as ready for review April 6, 2026 02:46
@ascend-robot
Copy link
Copy Markdown

CLA Signature Guide

@EdwardXuy , thanks for your pull request.

The following commit(s) are not associated with a signed Contributor License Agreement (CLA).

Commit Reason
0b9fff2a Implement send_score_request fun... the email used in the commit is not linked to a signed CLA!
please verify that it matches the email you used when signing the CLA.
34ceebe0 CI Lint the email used in the commit is not linked to a signed CLA!
please verify that it matches the email you used when signing the CLA.

To sign CLA, click here.

To check if your email is configured correctly, refer to the FAQs.

Once you've signed the CLA or updating your email, please comment /check-cla to revalidate CLA status.

@ascend-robot
Copy link
Copy Markdown

CLA Signature Guide

@EdwardXuy , thanks for your pull request.

The following commit(s) are not associated with a signed Contributor License Agreement (CLA).

Commit Reason
0b9fff2a Implement send_score_request fun... the email used in the commit is not linked to a signed CLA!
please verify that it matches the email you used when signing the CLA.
34ceebe0 CI Lint the email used in the commit is not linked to a signed CLA!
please verify that it matches the email you used when signing the CLA.

To sign CLA, click here.

To check if your email is configured correctly, refer to the FAQs.

Once you've signed the CLA or updating your email, please comment /check-cla to revalidate CLA status.

1 similar comment
@ascend-robot
Copy link
Copy Markdown

CLA Signature Guide

@EdwardXuy , thanks for your pull request.

The following commit(s) are not associated with a signed Contributor License Agreement (CLA).

Commit Reason
0b9fff2a Implement send_score_request fun... the email used in the commit is not linked to a signed CLA!
please verify that it matches the email you used when signing the CLA.
34ceebe0 CI Lint the email used in the commit is not linked to a signed CLA!
please verify that it matches the email you used when signing the CLA.

To sign CLA, click here.

To check if your email is configured correctly, refer to the FAQs.

Once you've signed the CLA or updating your email, please comment /check-cla to revalidate CLA status.

@ascend-robot
Copy link
Copy Markdown

CLA Signature Guide

@EdwardXuy , thanks for your pull request.

The following commit(s) are not associated with a signed Contributor License Agreement (CLA).

Commit Reason
0b9fff2a Implement send_score_request fun... the email used in the commit is not linked to a signed CLA!
please verify that it matches the email you used when signing the CLA.
34ceebe0 CI Lint the email used in the commit is not linked to a signed CLA!
please verify that it matches the email you used when signing the CLA.

To sign CLA, click here.

To check if your email is configured correctly, refer to the FAQs.

Once you've signed the CLA or updating your email, please comment /check-cla to revalidate CLA status.

@ascend-robot
Copy link
Copy Markdown

CLA Signature Guide

@EdwardXuy , thanks for your pull request.

The following commit(s) are not associated with a signed Contributor License Agreement (CLA).

Commit Reason
0b9fff2a Implement send_score_request fun... the email used in the commit is not linked to a signed CLA!
please verify that it matches the email you used when signing the CLA.
34ceebe0 CI Lint the email used in the commit is not linked to a signed CLA!
please verify that it matches the email you used when signing the CLA.

To sign CLA, click here.

To check if your email is configured correctly, refer to the FAQs.

Once you've signed the CLA or updating your email, please comment /check-cla to revalidate CLA status.

@ascend-robot
Copy link
Copy Markdown

CLA Signature Guide

@EdwardXuy , thanks for your pull request.

The following commit(s) are not associated with a signed Contributor License Agreement (CLA).

Commit Reason
0b9fff2a Implement send_score_request fun... the email used in the commit is not linked to a signed CLA!
please verify that it matches the email you used when signing the CLA.
34ceebe0 CI Lint the email used in the commit is not linked to a signed CLA!
please verify that it matches the email you used when signing the CLA.

To sign CLA, click here.

To check if your email is configured correctly, refer to the FAQs.

Once you've signed the CLA or updating your email, please comment /check-cla to revalidate CLA status.

@ascend-robot
Copy link
Copy Markdown

CLA Signature Guide

@EdwardXuy , thanks for your pull request.

The following commit(s) are not associated with a signed Contributor License Agreement (CLA).

Commit Reason
0b9fff2a Implement send_score_request fun... the email used in the commit is not linked to a signed CLA!
please verify that it matches the email you used when signing the CLA.
34ceebe0 CI Lint the email used in the commit is not linked to a signed CLA!
please verify that it matches the email you used when signing the CLA.

To sign CLA, click here.

To check if your email is configured correctly, refer to the FAQs.

Once you've signed the CLA or updating your email, please comment /check-cla to revalidate CLA status.

@ascend-robot
Copy link
Copy Markdown

CLA Signature Guide

@EdwardXuy , thanks for your pull request.

The following commit(s) are not associated with a signed Contributor License Agreement (CLA).

Commit Reason
0b9fff2a Implement send_score_request fun... the email used in the commit is not linked to a signed CLA!
please verify that it matches the email you used when signing the CLA.
34ceebe0 CI Lint the email used in the commit is not linked to a signed CLA!
please verify that it matches the email you used when signing the CLA.

To sign CLA, click here.

To check if your email is configured correctly, refer to the FAQs.

Once you've signed the CLA or updating your email, please comment /check-cla to revalidate CLA status.

@cherryblo cherryblo merged commit 2b872b7 into Ascend:testcases Apr 6, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants