Skip to content

[SWE-Paddle] Add task PaddlePaddle__Paddle-79275 - #1447

Open
Echo-Nie wants to merge 3 commits into
PaddlePaddle:masterfrom
Echo-Nie:79275
Open

[SWE-Paddle] Add task PaddlePaddle__Paddle-79275#1447
Echo-Nie wants to merge 3 commits into
PaddlePaddle:masterfrom
Echo-Nie:79275

Conversation

@Echo-Nie

Copy link
Copy Markdown
Contributor

关联

说明

  • 新增 SWE-Paddle 任务 PaddlePaddle__Paddle-79275

@sunzhongkai588

验证结果

状态 Existing attention exports P2P Multi-mask composition F2P Identity behavior F2P Invalid-input validation F2P
Base + tests/test.patch PASS FAIL,符合预期 FAIL,符合预期 FAIL,符合预期
Base + test patch + solution/code.patch PASS PASS PASS PASS

Base P2P:Existing attention exports remain available

.                                                                        [100%]
1 passed in 0.05s
Base existing-attention-exports P2P exit code: 0

Base F2P:Compose multiple masks and forward arguments

F                                                                        [100%]
================================== FAILURES ===================================
___________ test_or_and_masks_combine_results_and_forward_arguments ___________

    def test_or_and_masks_combine_results_and_forward_arguments():
>       or_masks, and_masks = _load_flex_functions()

E       AssertionError: paddle.nn.attention.flex_attention must provide the mask-combination APIs
E       assert False
E        +  where False = exists()

test\swe_paddle\test_pr79275_flex_attention_masks.py:78: AssertionError
=========================== short test summary info ===========================
FAILED test/swe_paddle/test_pr79275_flex_attention_masks.py::test_or_and_masks_combine_results_and_forward_arguments
1 failed in 0.54s
Base multi-mask-composition F2P exit code: 1

Base F2P:Single-mask and empty-mask identity behavior

F                                                                        [100%]
================================== FAILURES ===================================
_______ test_single_and_empty_mask_combinations_have_identity_behavior ________

    def test_single_and_empty_mask_combinations_have_identity_behavior():
>       or_masks, and_masks = _load_flex_functions()

E       AssertionError: paddle.nn.attention.flex_attention must provide the mask-combination APIs
E       assert False

FAILED test/swe_paddle/test_pr79275_flex_attention_masks.py::test_single_and_empty_mask_combinations_have_identity_behavior
1 failed in 0.48s
Base identity-behavior F2P exit code: 1

Base F2P:Reject non-callable mask inputs

F                                                                        [100%]
================================== FAILURES ===================================
_________________ test_non_callable_mask_inputs_are_rejected __________________

    def test_non_callable_mask_inputs_are_rejected():
>       or_masks, and_masks = _load_flex_functions()

E       AssertionError: paddle.nn.attention.flex_attention must provide the mask-combination APIs
E       assert False

FAILED test/swe_paddle/test_pr79275_flex_attention_masks.py::test_non_callable_mask_inputs_are_rejected
1 failed in 0.41s
Base invalid-input-validation F2P exit code: 1

Base 完整任务脚本

.FFF                                                                     [100%]
================================== FAILURES ===================================
FAILED test/swe_paddle/test_pr79275_flex_attention_masks.py::test_or_and_masks_combine_results_and_forward_arguments
FAILED test/swe_paddle/test_pr79275_flex_attention_masks.py::test_single_and_empty_mask_combinations_have_identity_behavior
FAILED test/swe_paddle/test_pr79275_flex_attention_masks.py::test_non_callable_mask_inputs_are_rejected
3 failed, 1 passed in 0.56s
Base tests/test.sh exit code: 1

Solution 测试

Solution existing-attention-exports P2P:
1 passed in 0.02s

Solution multi-mask-composition F2P:
1 passed in 0.03s

Solution identity-behavior F2P:
1 passed in 0.03s

Solution invalid-input-validation F2P:
1 passed in 0.03s

tests/test.sh

....                                                                     [100%]
4 passed in 0.03s
Solution tests/test.sh exit code: 0

@paddle-bot

paddle-bot Bot commented Jul 27, 2026

Copy link
Copy Markdown

你的PR提交成功,感谢你对开源项目的贡献!
请检查PR提交格式和内容是否完备,具体请参考示例模版
Your PR has been submitted. Thanks for your contribution!
Please check its format and content. For this, you can refer to Template and Demo.

Echo-Nie added 2 commits July 31, 2026 16:25
新增 flex_attention mask 组合接口以支持逻辑 OR 和 AND 组合,并确保与现有 API 兼容。
Updated the proposal for PaddlePaddle__Paddle-79275 to clarify the task details, including the addition of or_masks and and_masks APIs for flex attention. Adjusted sections for clarity and consistency.
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.

1 participant