machine-learning-engineering-for-production-public icon indicating copy to clipboard operation
machine-learning-engineering-for-production-public copied to clipboard

Fix (C1W2): Adding Check for Existing Directory Before Creation

Open iamyufan opened this issue 2 years ago • 0 comments

This pull request addresses an issue found in the C1W2_Ungraded_Lab_Birds_Cats_Dogs.ipynb file located at course1/week2-ungraded-lab. The problem was related to the creation of a directory without checking whether it already exists. I have made the following change:

Original Code:

os.mkdir(base_birds_dir)

Modified Code:

if not os.path.exists(base_birds_dir):
    os.mkdir(base_birds_dir)

This change adds a condition to check if the directory exists before attempting to create it.

Thank you for considering this pull request. I look forward to your feedback.

iamyufan avatar Sep 01 '23 02:09 iamyufan