Skip to content

Commit e5fdbd9

Browse files
authored
Improve MNIST download logging
1 parent db88be7 commit e5fdbd9

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

examples/singa_peft/examples/data/download_mnist.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,17 @@
2323

2424

2525
def check_exist_or_download(url, download_dir):
26+
download_dir = os.path.abspath(download_dir)
2627
os.makedirs(download_dir, exist_ok=True)
2728

2829
name = url.rsplit('/', 1)[-1]
2930
filename = os.path.join(download_dir, name)
3031

3132
if not os.path.isfile(filename):
32-
print("Downloading %s to %s" % (url, filename))
33+
print("Downloading %s -> %s" % (url, filename))
3334
urllib.request.urlretrieve(url, filename)
3435
else:
35-
print("Already Downloaded: %s" % filename)
36-
36+
print("Already Downloaded: %s -> %s" % (url, filename))
3737

3838
if __name__ == '__main__':
3939
parser = argparse.ArgumentParser(

0 commit comments

Comments
 (0)