Skip to content

Commit

Permalink
Updated the azurepipeline example. (kubeflow#647)
Browse files Browse the repository at this point in the history
I believe there is a small bug in the script, use tmp variable to solve the issue.
  • Loading branch information
NikeNano authored and k8s-ci-robot committed Sep 27, 2019
1 parent cfe166f commit 351aaf8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pipelines/azurepipeline/code/preprocess/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ def walk_images(path, image_size=160):
break

for d in labels:
path = os.path.join(path, d)
print('Processing {}'.format(path))
tmp_path = os.path.join(path, d)
print('Processing {}'.format(tmp_path))
# only care about files in directory
for item in os.listdir(path):
for item in os.listdir(tmp_path):
if not item.lower().endswith('.jpg'):
print('skipping {}'.format(item))
continue

image = os.path.join(path, item)
image = os.path.join(tmp_path, item)
try:
img = process_image(image, image_size)
assert img.shape[2] == 3, "Invalid channel count"
Expand Down

0 comments on commit 351aaf8

Please sign in to comment.