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

add white files(#26646)

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