fix(bot): fix a bug where references was a string instead of an array #18
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 callsgenerate_with_references
thereferences
variable is sometimes just a string instead of an array. Because of this, wheninject_references_to_messages
inutils.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 👏