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

FileNotFoundError: [Errno 2] No such file or directory: '../datasets/rplan/list.txt' #18

Open
mikrocosmoss opened this issue Feb 27, 2024 · 5 comments

Comments

@mikrocosmoss
Copy link

how to solve it?

@YuP2905
Copy link

YuP2905 commented Mar 22, 2024

hey, u should writ a script.

import os

def get_image_number(name):
    return int(name.split(".")[0])

def write_filenames_to_txt(directory, txt_file):
    json_names = os.listdir(directory)
    json_names = sorted(json_names, key=get_image_number)
    with open(txt_file, 'w') as f:
        for filename in json_names:
            f.write(filename + '\n')


write_filenames_to_txt("plan_json", "list.txt")

@adeerkhan
Copy link

@YuP2905 Hi, thanks for the suggestion. I tried the script and made the list.txt file, then placed it inside the rplan folder. But I am getting this issue:

PS E:\HouseDiffusion\house_diffusion> python image_train.py --dataset rplan --batch_size 32 --set_name train --target_set 8
Logging to ckpts\openai_2024_04_06_02_24_29_449396
creating model and diffusion...
Number of model parameters: 26541330
COSINE
creating data loader...
training...
loading train of target set 8
Traceback (most recent call last):
  File "E:\HouseDiffusion\house_diffusion\image_train.py", line 90, in <module>
    main()
  File "E:\HouseDiffusion\house_diffusion\image_train.py", line 47, in main
    TrainLoop(
  File "E:\HouseDiffusion\house_diffusion\house_diffusion\train_util.py", line 160, in run_loop
    batch, cond = next(self.data)
  File "E:\HouseDiffusion\house_diffusion\house_diffusion\rplanhg_datasets.py", line 31, in load_rplanhg_data
    dataset = RPlanhgDataset(set_name, analog_bit, target_set)
  File "E:\HouseDiffusion\house_diffusion\house_diffusion\rplanhg_datasets.py", line 117, in __init__
    with open(f'{base_dir}/list.txt') as f:
FileNotFoundError: [Errno 2] No such file or directory: '../datasets/rplan/list.txt'
 

@YuP2905
Copy link

YuP2905 commented Apr 6, 2024

I think u should check your path

@LIANHUA2
Copy link

Hi, I have the same problem. The error message is exactly the same as yours. In which path did you put the list.txt file to solve this problem?

@YuP2905
Copy link

YuP2905 commented Dec 2, 2024

Hi, I have the same problem. The error message is exactly the same as yours. In which path did you put the list.txt file to solve this problem?

Sorry, I haven't focused on this project for a long time. But I think you can find out original dataset. That's how I solved this issue at that time.

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

4 participants