Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ensure that the entire directory path is created; refactor: don't use same variable name in the parent loop; #294

Open
wants to merge 2 commits into
base: old_gpt_2_chinese_before_2021_4_22
Choose a base branch
from

Commits on Apr 25, 2024

  1. Configuration menu
    Copy the full SHA
    76ff283 View commit details
    Browse the repository at this point in the history
  2. fix: ensure that the entire directory path is created

    Using os.mkdir to create a directory can lead to an error if the parent directory does not exist. It's safer to use os.makedirs with the exist_ok=True parameter to ensure that the entire directory path is created if it does not exist.
    The original line uses os.mkdir which can fail if the directory's parent does not exist. Changing it to os.makedirs and adding the exist_ok=True parameter ensures that the directory is created along with any necessary parent directories, preventing potential runtime errors.
    RealHurrison authored Apr 25, 2024
    Configuration menu
    Copy the full SHA
    550ebc8 View commit details
    Browse the repository at this point in the history