add white files(#26646)

revert-26856-strategy_example2
zhangchunle 5 years ago committed by GitHub
parent 761ed17db3
commit 1fcddf57c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -480,13 +480,7 @@ 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
if filename.startswith(
'../python/paddle/fluid/contrib'
) or filename == '../python/paddle/verison.py':
pass
elif filename not in filenames:
filenames.append(filename) filenames.append(filename)
# get all methods # get all methods
method = '' method = ''
@ -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:
if key == 'wlist_file':
wlist_file = wlist_file + load_dict[key]
else:
wlist = wlist + load_dict[key] wlist = wlist + load_dict[key]
return wlist 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:
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:

@ -1,4 +1,10 @@
{ {
"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",

Loading…
Cancel
Save