lonestar234028 / nlvr

0 stars 0 forks source link

modelscope/reason_step_huge/reason_extraction_v6.py#L42 load non json file failed #2

Open Claber opened 1 year ago

Claber commented 1 year ago

this file is actually not a json file:( each single line is in json-format, but the the whole thing is not) https://github.com/lil-lab/nlvr/blob/master/nlvr2/data/test1.json

then this will definitely always fail: https://github.com/lonestar234028/nlvr/blob/main/modelscope/reason_step_huge/reason_extraction_v6.py#L42

Claber commented 1 year ago

and there is no such a key "images" in each json line. https://github.com/lonestar234028/nlvr/blob/main/modelscope/reason_step_huge/reason_extraction_v6.py#L70 " 69 v = ann[i] 70 images = v['images']

    img_key = v['sentence'] + '##' + '##'.join(images)
    text = prompt.strip()

" line example in (https://github.com/lil-lab/nlvr/blob/master/nlvr2/data/test1.json): { "validation": { "28": "False" }, "sentence": "There is an empty glass.", "left_url": "http://xxxx.jpg", "writer": "103", "label": "False", "right_url": "https://yyyy.jpg", "synset": "beer bottle", "query": "group of beer bottles41", "identifier": "test1-0-1-0", "extra_validations": { "56": "False", "83": "False", "19": "False", "92": "False" } }