google-research / google-research/composed_image_retrieval
KeyError: 'filepath' - run the sample train failed & Sample evaluation result log is empty
- Dominant language
- Shell
- Stars
- 197
- Forks
- 20
- PR merge metrics
- No merged PRs in 30d
Description
@kihyuks @ksaito-ut
Hi! I tried running the train sample, but I got the errors as follows:
```
Traceback (most recent call last):
File "/home/anaconda3/lib/python3.9/site-packages/torch/multiprocessing/spawn.py", line 69, in _wrap
fn(i, *args)
File "/home/CIR_Lab/composed_image_retrieval/src/main.py", line 126, in main_worker
data = get_data(args, (preprocess_train, preprocess_val))
File "/home/CIR_Lab/composed_image_retrieval/src/data.py", line 577, in get_data
data["train"] = get_dataset_fn(args.train_data, args.dataset_type)(
File "/home/CIR_Lab/composed_image_retrieval/src/data.py", line 473, in get_csv_dataset
dataset = CsvDataset(
File "/home/CIR_Lab/composed_image_retrieval/src/data.py", line 377, in __init__
self.images = df[img_key].tolist()
File "/home/anaconda3/lib/python3.9/site-packages/pandas/core/frame.py", line 3807, in __getitem__
indexer = self.columns.get_loc(key)
File "/home/anaconda3/lib/python3.9/site-packages/pandas/core/indexes/base.py", line 3804, in get_loc
raise KeyError(key) from err
KeyError: 'filepath'
```
I have some questions:
- 'filepath' seems to be **args.csv_img_key** 's default parameter. Should I specify it or not?
- Should I **extract** the jpg images **one by one** from the tar archive in **cc3m download by img2dataset** ,add the path information of the images to the original **tsv** file and change it to **csv** file ?
- I also tried running the evaluation code, but after got **evaluation done**, the log folder is empty. Is this normal? Where should I see the results?
Contributor guide
Research direction
Start in src/main.py at main_worker and trace the sample configuration into src/data.py, especially get_data, get_csv_dataset, and CsvDataset where the filepath lookup fails. Reproduce the sample training and evaluation runs, then document or correct the expected image metadata and identify where evaluation results are written; done means both sample workflows complete with visible results.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100