Skip to content

Conversation

@LittleHeroZZZX
Copy link
Contributor

NO REVIEW

…n signatures

- Remove `no_need_convert_file_path` parameter from `generate_category1_table` and `generate_category2_table`
- Update `extract_no_need_convert_list` to read from `api_mapping.json` instead of parsing a Python file
- Remove unused file paths in `main` function
- Improve error handling in `load_mapping_json` to return empty dict on failure
Copilot AI review requested due to automatic review settings January 20, 2026 07:56
@paddle-bot
Copy link

paddle-bot bot commented Jan 20, 2026

感谢你贡献飞桨文档,文档预览构建中,Docs-New 跑完后即可预览,预览链接:http://preview-pr-7683.paddle-docs-preview.paddlepaddle.org.cn/documentation/docs/zh/api/index_cn.html
预览工具的更多说明,请参考:飞桨文档预览工具

@github-actions
Copy link

📚 本次 PR 文档预览链接(点击展开)
ℹ️ 预览提醒
请等待 Docs-NEW 流水线运行完成后再点击预览链接,否则可能会看到旧版本内容或遇到链接无法访问的情况。
  • docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/transformers.LogitsProcessor.md: 点击预览
  • docs/guides/model_convert/convert_from_pytorch/api_difference/invok_only_diff/torch.allclose.md: 点击预览
  • docs/guides/model_convert/convert_from_pytorch/api_difference/invok_only_diff/transformers.StoppingCriteriaList.md: 点击预览

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 is a test PR explicitly marked as "NO REVIEW TEST CI" that includes refactoring of API mapping utilities and documentation updates.

Changes:

  • Refactored extract_no_need_convert_list() to read from api_mapping.json instead of parsing Python AST
  • Fixed bug in load_mapping_json error handling (returning {} instead of [])
  • Updated API documentation for transformers.StoppingCriteriaList and transformers.LogitsProcessor
  • Moved torch.allclose documentation from args_name_diff to invok_only_diff category with updated Paddle API mapping

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
docs/guides/model_convert/convert_from_pytorch/tools/validate_api_difference_consistency.py Updated function call to use simplified signature
docs/guides/model_convert/convert_from_pytorch/tools/utils.py Refactored extract_no_need_convert_list() to use JSON parsing; removed unused ast import; fixed error return type in load_mapping_json
docs/guides/model_convert/convert_from_pytorch/tools/generate_pytorch_api_mapping.py Updated function signatures and calls to remove unused parameters
docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.log_normal_.md Deleted file (entire file removed)
docs/guides/model_convert/convert_from_pytorch/api_difference/invok_only_diff/transformers.StoppingCriteriaList.md Updated API signatures to include *args parameter
docs/guides/model_convert/convert_from_pytorch/api_difference/invok_only_diff/torch.allclose.md Added file with mapping from torch.allclose to paddle.compat.allclose
docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/transformers.LogitsProcessor.md Corrected Paddle parameter name from scores to logits
docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.allclose.md Deleted file (moved to invok_only_diff category)

transformers.LogitsProcessor(input_ids: torch.LongTensor, scores: torch.FloatTensor)
```

### [paddleformers.generation.LogitsProcessor](https://github.com/PaddlePaddle/PaddleNLP/blob/e336e78c338d2514ee6c937982ce5d8c960b85ff/paddlenlp/generation/logits_process.py#L26)
Copy link
Collaborator

Choose a reason for hiding this comment

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

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