-
Notifications
You must be signed in to change notification settings - Fork 27.7k
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 typos in README and bugs in RAG example code for end-to-end evaluation and finetuning #9355
Fix typos in README and bugs in RAG example code for end-to-end evaluation and finetuning #9355
Conversation
…r.generate of modeling_rag.py)
|
||
@staticmethod | ||
def add_ray_specific_args(parser): | ||
parser.add_argument( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why delete this argument?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As explained above, this argument is duplicate (See here) and causes an error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would remove the other one and keep this one instead; sincice it's a ray-specific arg
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the comment @lhoestq
I did so in the latest commit.
@@ -130,8 +130,6 @@ def evaluate_batch_e2e(args, rag_model, questions): | |||
early_stopping=False, | |||
num_return_sequences=1, | |||
bad_words_ids=[[0, 0]], # BART likes to repeat BOS tokens, dont allow it to generate more than one | |||
clean_up_tokenization=True, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
--src_path biencoder-nq-dev.json \ | ||
--evaluation_set output/biencoder-nq-dev.questions \ | ||
--gold_data_path output/biencoder-nq-dev.pages | ||
``` | ||
3. Run evaluation: | ||
```bash | ||
python examples/rag/eval_rag.py \ | ||
python examples/research_projects/rag/eval_rag.py \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @yoshitomo-matsubara,
Thanks a lot for your PR! The changes look great to me - just one question, why can we delete the argument num_retrieval_workers
?
Thank you for reviewing this PR! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the very in-detail PR description @yoshitomo-matsubara
Great work @yoshitomo-matsubara |
Thank you for reviewing PR @patrickvonplaten @lhoestq ! |
What does this PR do?
This PR fixes bugs in RAG example code for end-to-end evaluation and finetuning.
1. Follow the file paths of reorganized examples
Also, the file paths for example code in README are updated (
example/rag/
->example/research_projects/rag/
)2. End-to-end evaluation
With the above command, I encountered a few errors:
3. Finetuning
With the above command, I found two easy bugs to be fixed:
return parser
returns None toparser
and crashes herenum_retrieval_workers
is also a blocker when usingfinetune_rag.py
Environments
Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors which may be interested in your PR.
@patrickvonplaten @lhoestq