提交 e8493620 编写于 作者: M minqiyang

Remove the overfix of print function in dataset/ folder

上级 4bf3c8c5
......@@ -74,13 +74,13 @@ def download(url, module_name, md5sum, save_name=None):
retry_limit = 3
while not (os.path.exists(filename) and md5file(filename) == md5sum):
if os.path.exists(filename):
print(("file md5", md5file(filename), md5sum))
print("file md5", md5file(filename), md5sum)
if retry < retry_limit:
retry += 1
else:
raise RuntimeError("Cannot download {0} within retry limit {1}".
format(url, retry_limit))
print(("Cache file %s not found, downloading %s" % (filename, url)))
print("Cache file %s not found, downloading %s" % (filename, url))
r = requests.get(url, stream=True)
total_length = r.headers.get('content-length')
......@@ -189,7 +189,7 @@ def cluster_files_reader(files_pattern,
my_file_list = []
for idx, fn in enumerate(file_list):
if idx % trainer_count == trainer_id:
print(("append file: %s" % fn))
print("append file: %s" % fn)
my_file_list.append(fn)
for fn in my_file_list:
with open(fn, "r") as f:
......
......@@ -243,7 +243,7 @@ def unittest():
for test_count, _ in enumerate(test()()):
pass
print((train_count, test_count))
print(train_count, test_count)
def fetch():
......
......@@ -330,4 +330,4 @@ if __name__ == "__main__":
mytest = functools.partial(
__reader__, filepath="MQ2007/MQ2007/Fold1/sample", format="listwise")
for label, query in mytest():
print((label, query))
print(label, query)
......@@ -47,7 +47,7 @@ def download_data_if_not_yet():
nltk.download(
'movie_reviews', download_dir=paddle.dataset.common.DATA_HOME)
print("Download data set success.....")
print(("Path is " + nltk.data.find('corpora/movie_reviews').path))
print("Path is " + nltk.data.find('corpora/movie_reviews').path)
def get_word_dict():
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册