Skip to content

更新unique函数中的sorted参数 #569

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 8, 2025

Conversation

Qin-sx
Copy link
Contributor

@Qin-sx Qin-sx commented Apr 3, 2025

PR Docs

PaddlePaddle/docs#7206

PR APIs

paddle.unique

	modified:   paconvert/api_mapping.json
	modified:   tests/test_unique.py
Copy link

paddle-bot bot commented Apr 3, 2025

Thanks for your contribution!

@paddle-bot paddle-bot bot added the contributor External developers label Apr 3, 2025
	modified:   paconvert/api_mapping.json
@zhwesky2010
Copy link
Collaborator

zhwesky2010 commented Apr 3, 2025

@Qin-sx 单测为何失败了,这和之前的sorted可直接去掉的结论不一致

	modified:   tests/test_Tensor_unique.py
@Qin-sx
Copy link
Contributor Author

Qin-sx commented Apr 3, 2025

@Qin-sx 单测为何失败了,这和之前的sorted可直接去掉的结论不一致

应该是tensor.unique的测试没有修改,我之前是按照test_tensor文件名搜索的测试,没有搜索到test_Tensor相关测试。
同时想请问一下是在PaConvert目录下执行python -m pytest tests命令吗?我在执行时只有flash_attn_tests目录下的四个测试会报错。

@Qin-sx
Copy link
Contributor Author

Qin-sx commented Apr 3, 2025

在CodeStyle检查中,好像paconvert/transformer/import_transformer.py文件会报错

2025-04-04 03:45:43 black....................................................................Failed
2025-04-04 03:45:43 - hook id: black
2025-04-04 03:45:43 - duration: 4.15s
2025-04-04 03:45:43 - files were modified by this hook
2025-04-04 03:45:43 reformatted paconvert/transformer/import_transformer.py
2025-04-04 03:45:43 All done! ✨ 🍰 ✨
2025-04-04 03:45:43 1 file reformatted, 1785 files left unchanged.
2025-04-04 03:45:46 isort....................................................................Failed
2025-04-04 03:45:46 - hook id: isort
2025-04-04 03:45:46 - duration: 2.66s
2025-04-04 03:45:46 - files were modified by this hook
2025-04-04 03:45:46 Fixing /workspace/9d218bf9-9e8b-4860-8cc6-90ecdb2b49f7/PaConvert/paconvert/transformer/import_transformer.py
2025-04-04 03:45:46 Skipped 6 files

@zhwesky2010
Copy link
Collaborator

zhwesky2010 commented Apr 8, 2025

PR Docs

PaddlePaddle/docs#7206

PR APIs

paddle.unique

@Qin-sx PR描述里链接一下映射文档的PR:PaddlePaddle/docs#7206 ,因为要保证映射文档PaConvert是一致对应的。

obj.run(
pytorch_code, ["result"], unsupport=True, reason="Paddle not support 'sorted' "
)
obj.run(pytorch_code, ["result"])
Copy link
Collaborator

Choose a reason for hiding this comment

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

sorted=True的情况下做了测试没?要反复交叉测试结果是否完全一致

@zhwesky2010 zhwesky2010 merged commit 04ebc75 into PaddlePaddle:master Apr 8, 2025
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants