ConceptBottleneck icon indicating copy to clipboard operation
ConceptBottleneck copied to clipboard

no definition of 'val_files' in the data_processing.py

Open despairisa opened this issue 2 months ago • 0 comments

I have used python to run the preprocessing file: data_processing.py, which is in the CUB folder. But it fails in a strange issue, below is the code and error message.

Code:

python3 data_processing.py -data_dir datasets/CUB_200_2011 -save_dir CUB_processed

Error:

Number of train images from official train test split: 5994 Traceback (most recent call last): File "/home/chiayilai/Desktop/ConceptBottleneck-master/CUB/data_processing.py", line 85, in train_data, val_data, test_data = extract_data(args.data_dir) File "/home/chiayilai/Desktop/ConceptBottleneck-master/CUB/data_processing.py", line 64, in extract_data if val_files is not None: NameError: name 'val_files' is not defined

The strange thing is that I can’t find the definition of “val_files” in the data_processing.py. And I can’t find any keywords related to it in the readme file. I tried to add a new folder named “val_files”, but it was still no use. Then I altered the “val_files” to “val_data”. It successfully produced three .pkl files, but I don’t know if this way is correct or not.

despairisa avatar Apr 18 '24 23:04 despairisa