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

IndexError: index 1 is out of bounds for dimension 0 with size 1 #150

Closed
lucasjinreal opened this issue Apr 15, 2024 · 8 comments
Closed

Comments

@lucasjinreal
Copy link

lucasjinreal commented Apr 15, 2024

cur_image_features = image_features[cur_image_idx]
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
IndexError: index 1 is out of bounds for dimension 0 with size 1

Is there any reason why previous version can evaluate normally, but updated from git got such error?

And this error happens only during evaluation at about 6%

Is there zero images samples in eval MMBench?

@lucasjinreal lucasjinreal changed the title assert 'type' in inputs and 'value' in inputs AssertionError cur_image_features = image_features[cur_image_idx] ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^ IndexError: index 1 is out of bounds for dimension 0 with size 1 Apr 15, 2024
@lucasjinreal lucasjinreal changed the title cur_image_features = image_features[cur_image_idx] ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^ IndexError: index 1 is out of bounds for dimension 0 with size 1 IndexError: index 1 is out of bounds for dimension 0 with size 1 Apr 15, 2024
@kennymckormick
Copy link
Member

Hi, @lucasjinreal ,
Which VLM are you evaluating? I think MMBench does not have zero-image samples. As an ablation, you can try to evaluate some other VLMs like qwen_chat on MMBench to localize the bug.
BTW, VLMEvalKit has recently updated its generate interface (check #140). I'm not sure if this error is due to the refactoring.

@lucasjinreal
Copy link
Author

Am not sure as well, but just got this, I used llava model with qwen as LLM. The task is MMBenchCN

I used a try ... catch to generate_inner, not it can run, but looks like would effect the metric

@kennymckormick
Copy link
Member

@lucasjinreal
Please provide a command so that I can try to reproduce this problem.

@lucasjinreal
Copy link
Author

Sorry, the exception got is on MMMU, not mmbench.

@icrto
Copy link

icrto commented Apr 16, 2024

I am also experiencing the same problem when trying to run on MMMU. (I tried it with llava_v1.5_7b.)

@lucasjinreal
Copy link
Author

@kennymckormick Can u take a look, actually didn't get this in previous version, some models actually didn't support more than 2 images in a single chat like llava.

@kennymckormick
Copy link
Member

@kennymckormick Can u take a look, actually didn't get this in previous version, some models actually didn't support more than 2 images in a single chat like llava.

OK, I will give a try for the llava_v1.5_7b x MMMU configuration.

@kennymckormick
Copy link
Member

Hi, @icrto @lucasjinreal
After investigation I find this is a bug due to the refactor of interface. We have fixed it now. Please have a retry with the latest main branch.

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

3 participants