-
Notifications
You must be signed in to change notification settings - Fork 5.9k
add new api ci check file #33609
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
add new api ci check file #33609
Conversation
|
Thanks for your contribution! |
tools/print_signatures.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
只有这里调用format_spec函数,是否上面的 format_spec 和 get_functools_partial_spec 函数也可以去掉了
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
wadefelix
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
可验证下和get_all_api的结果是否有差异
| ErrorSet = set() | ||
| IdSet = set() | ||
| skiplist = [ | ||
| 'paddle.vision.datasets.DatasetFolderImageFolder', 'paddle.truncdigamma' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
此二不已经在__init__.py予以更正了么,就不需要保留此list了
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
明白了。否则在对旧版执行这段程序都会出错
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
print_signatures.py会在本次pr合入前的paddle上也跑一遍,旧版paddle还没有更正,会导致ci失败。这里的skiplist主要为了在旧版上先跳过这两个问题。
| IdSet.add(instance_id) | ||
| member_dict[cur_name] = "({}, ('document', '{}'))".format( | ||
| cur_name, doc_md5) | ||
| if hasattr(instance, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
前面L113 if instance_id in IdSet已对alias做出判别了。此处的逻辑可去除
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
| print( | ||
| "Found alias API, alias name is: {}, original name is: {}". | ||
| format(member_name, instance.__name__), | ||
| file=sys.stderr) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
此py文件已引入了loggging日志记录,可用logger.warn 等输出过程日志
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
此处已经移除
jzhang533
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
不过最好把tools/print_signatures.py这个脚本弄得更正式一些。比如:
- 用
-h参数给出使用说明。 - importlib, functools,这些没用到的import给去掉。
XiaoguangHu01
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
下个pr清理skiplist时修改 |


PR types
New features
PR changes
Others
Describe
add new api ci check file
背景:
API相关CI检查的更新和完善
目前发现到的问题:
这样的代码也合入到了2.1版本中:https://github.com/PaddlePaddle/Paddle/blob/release/2.1/python/paddle/device.py#L28
为了防止带有错误字段的pr合入,更新ci递归遍历所有paddle下模块,依次检查每一项功能的可访问性,找出不具有可访问性的功能。
本pr增加了对paddle模块下的各级子模块的可访问性检查
新的检查机制能够发现的问题,例如:
__all__里少了逗号导致两个字符拼接到一起了。
或者仍然保留的无效的api接口
特殊说明:
skiplist = [
'paddle.vision.datasets.DatasetFolderImageFolder', 'paddle.truncdigamma'
]
这两个问题先加入skip列表暂时跳过,本次修复后,下次pr就可以清空skip列表了。否则旧版paddle会导致ci错误无法通过。