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

Error running run_training_synapse.sh #82

Open
Andrew2784 opened this issue Nov 13, 2024 · 1 comment
Open

Error running run_training_synapse.sh #82

Andrew2784 opened this issue Nov 13, 2024 · 1 comment

Comments

@Andrew2784
Copy link

Hello everyone. I am having trouble running the run_training_synapse.sh bash script. It starts to run for a few seconds until it encounters the following error:

FileNotFoundError: [Errno 2] No such file or directory: '../output_synapse\unetr_pp\3d_fullres\Task002_Synapse\unetr_pp_trainer_synapse__unetr_pp_Plansv2.1\fold_0\training_log_2024_11_13_17_16_06.txt'

I am pretty sure that I am running the bash script in the appropriate location, but I'm still not sure why this error keeps occurring. Any help would be appreciated. Thank you.

@ASCI02
Copy link

ASCI02 commented Dec 29, 2024

Hello, I hope you're still there. The reason for this issue is that the maybe_mkdir_p function in the code is not compatible with the Windows system. You can modify the maybe_mkdir_p function to:

def maybe_mkdir_p(directory):
    directory = os.path.abspath(directory)
    if not os.path.exists(directory):
        try:
            os.makedirs(directory)
        except FileExistsError:
            # This can sometimes happen when two jobs try to create the same directory at the same time,
            # especially on network drives.
            print("WARNING: Folder %s already existed and does not need to be created" % directory)

I hope this can help you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants