未验证 提交 1fcddf57 编写于 作者: Z zhangchunle 提交者: GitHub

add white files(#26646)

上级 761ed17d
......@@ -480,14 +480,8 @@ def get_filenames():
filename = ''
print("\nWARNING:----Exception in get api filename----\n")
print("\n" + api + ' module is ' + module + "\n")
if filename != '':
# rm contrib file
if filename.startswith(
'../python/paddle/fluid/contrib'
) or filename == '../python/paddle/verison.py':
pass
elif filename not in filenames:
filenames.append(filename)
if filename != '' and filename not in filenames:
filenames.append(filename)
# get all methods
method = ''
if inspect.isclass(eval(api)):
......@@ -557,14 +551,18 @@ def get_wlist():
'''
wlist = []
wlist_file = []
with open("wlist.json", 'r') as load_f:
load_dict = json.load(load_f)
for key in load_dict:
wlist = wlist + load_dict[key]
return wlist
if key == 'wlist_file':
wlist_file = wlist_file + load_dict[key]
else:
wlist = wlist + load_dict[key]
return wlist, wlist_file
wlist = get_wlist()
wlist, wlist_file = get_wlist()
if len(sys.argv) < 2:
print("Error: inadequate number of arguments")
......@@ -590,8 +588,14 @@ else:
if len(filenames) == 0 and len(whl_error) == 0:
print("-----API_PR.spec is the same as API_DEV.spec-----")
exit(0)
elif '../python/paddle/fluid/core_avx.py' in filenames:
filenames.remove('../python/paddle/fluid/core_avx.py')
rm_file = []
for f in filenames:
for w_file in wlist_file:
if f.startswith(w_file):
rm_file.append(f)
filenames.remove(f)
if len(rm_file) != 0:
print("REMOVE white files: %s" % rm_file)
print("API_PR is diff from API_DEV: %s" % filenames)
one_part_filenum = int(math.ceil(len(filenames) / cpus))
if one_part_filenum == 0:
......
{
"wlist_file" : [
"../python/paddle/fluid/contrib",
"../python/paddle/verison.py",
"../python/paddle/fluid/core_avx.py",
"../python/paddle/distributed"
],
"wlist_inneed":[
"append_LARS",
"BuildStrategy.debug_graphviz_path",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册