PyTorch-StudioGAN
PyTorch-StudioGAN copied to clipboard
PermissionError: [WinError 32]
Hi @mingukkang, POSTECH-CVLab team,
I'm encountering a PermissionError
while trying to run the following command on a Windows machine with PyTorch 2.1.0
and a single NVIDIA GPU.
python src/main.py -sf -sf_num 100 -metrics none -cfg src/configs/CIFAR10/DCGAN.yaml -data data/CIFAR10 -ckpt checkpts/DCGAN_CIFAR10 -save results_cifar/cifar10
I have already downloaded the CIFAR10 dataset and the DCGAN checkpoints. Below, you can find the error message I'm getting. how I can fix this issue?
Traceback (most recent call last):
File "C:\Projects\PyTorch-StudioGAN\src\main.py", line 192, in <module>
loader.load_worker(local_rank=rank,
File "C:\Projects\PyTorch-StudioGAN\src\loader.py", line 235, in load_worker
os.remove(join(cfgs.RUN.save_dir, "logs", run_name + ".log"))
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'results_cifar/cifar10\\logs\\CIFAR10-DCGAN-train-2023_11_07_15_36_39.log'
Thank you very much.
I encountered the same problem on Windows as well. Have you already found a solution to this issue?
Hi @HolyAkisy, As a temporary workaround you can comment the error line in the src/loader.py
as it's not too much important. it's just a log clearance
#if local_rank == 0:
# os.remove(join(cfgs.RUN.save_dir, "logs", run_name + ".log"))
You can also use the forked repo https://github.com/f-amerehi/PyTorch_StudioGAN
Hi @HolyAkisy, As a temporary workaround you can comment the error line in the
src/loader.py
as it's not too much important. it's just a log clearance#if local_rank == 0: # os.remove(join(cfgs.RUN.save_dir, "logs", run_name + ".log"))
You can also use the forked repo https://github.com/f-amerehi/PyTorch_StudioGAN
It's working now, thanks for your help.