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

[BUG]: gen_kwargs in requests are shallow copy? #224

Closed
xsgldhy opened this issue Sep 3, 2024 · 1 comment
Closed

[BUG]: gen_kwargs in requests are shallow copy? #224

xsgldhy opened this issue Sep 3, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@xsgldhy
Copy link

xsgldhy commented Sep 3, 2024

I have used the repo to evaluate LLaVA and InternVL2 model, both met the same problem, if I gen_kwargs.pop("some_key", None) in previous requests, then in latter requests before executing that line of code, that key in gen_kwargs will already been popped. In general, the first two or three or more requests work fine, popping the key out of previous gen_kwargs won't affect the latter ones, but then at some point, all the gen_kwargs will have that key already been popped before exectuing that line of code.
To be pointed, the key is specified through cli commands, not written in the yaml file. generation_kwargs specified through cli, these settings will be used over set parameters in yaml tasks.
I don't know the logic of generating the requests, but I think this is a bug. Currently I use copy.deepcopy to fix this.
image

@Luodian Luodian added the bug Something isn't working label Sep 5, 2024
@pufanyi
Copy link
Collaborator

pufanyi commented Sep 6, 2024

Hello! We have fixed the bug in #231 by deepcopy. Thank you so much!!!

@xsgldhy xsgldhy closed this as completed Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants