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

fix(bot): fix a bug where references was a string instead of an array #18

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gligoran
Copy link

Hello,

Firstly, thank you for this amazing resource. I've been reading about it and playing with the code all day to figure out how it all ties together. Amazing work! 🙌

I did find a small bug, though. In the process_fn when it calls generate_with_references the references variable is sometimes just a string instead of an array. Because of this, when inject_references_to_messages in utils.py spreads it, it becomes a big mess.

I'm not a python developer, but with the help of Copilot I was able to produce this little fix that worked.

It's probably not the best PR to merge, but it should help you find the source of the bug. I'm suspecting the eval_set = datasets.Dataset.from_dict(data) is not working as expected.

Oh, to reproduce the bug, you need to set rounds to 2 or more so it actually generates reference material for the second layer.

Again, thank you for the research paper and this code, it's amazing 👏

@raymondbernard
Copy link

raymondbernard commented Jun 27, 2024

@gligoran Think you need to comment out the references = item.get("references", []) as will otherize you leave it dangling.

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

Successfully merging this pull request may close these issues.

3 participants