-
Notifications
You must be signed in to change notification settings - Fork 226
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
Potential unexpected behavior in executor (that uses theglobal
)
#40
Comments
Especially, globals() will definitely memorize previous implementations, which will be used if the future generation is None. Or in future generation, it generate something (e.g., some functions) not exists but those functions are memorized in That means, the order to run the evaluation samples matters |
So if I understand correctly, it could potentially cause incorrect answers to be correct? |
Yes, right!. But I assume for more capable models like GPT-3.5/4 or other large models, such an issue might rarely happen. I just got in touch with the authors, and currently making a fix. |
I think the current issue is that, we need to deal with the situation We always put assertion for the current implementation assert isinstance(cur_func_impl, str) because it is possible that "cur_func_impl" is pure natural language response without any code extracted, which make the variable My current attempt:
if cur_func_impl is None:
# code cannot be extracted from the response.
cur_func_impl = ""
if reflected_func_impl is None:
# code cannot be extracted from the response.
# we just skip this iteration and reflection again.
cur_iter += 1
continue I'm making a PR on this, and will update more results here Some changes: main...allanj:reflexion:fix_global |
If I clear the |
I was running the script https://github.com/noahshinn/reflexion/blob/main/programming_runs/run_reflexion_codellama_multi.sh
with CodeLLaMA model, simply change the
codellama
tocodellama-7b
The performance is around 30~40% though it will get killed in the middle of the experiment.
Observation
Some predictions present unexpected behavior while it is correct prediction
is_solved = True
. In the following prediction (which is also attached here)Reason
Because we always use the function
globals()
, even though the program after reflexion has nothing,globals()
already contain the program in the first attempt.Thus, as we do not clear the information in
globals()
every time, potentially this could lead to some unexpected behavior.I have been a bit confused here, hope the authors can clarify more on this.
The text was updated successfully, but these errors were encountered: