-
Notifications
You must be signed in to change notification settings - Fork 9
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
QA for Self-Refine (HotpotQA, FEVER, AmbigNQ, TriviaQA) #227
Changes from 17 commits
e0a0d3e
e40aa57
7ec9463
0ab9b38
62fa1cd
6183990
558fb91
8d68636
ed9c876
1534a86
2dcb457
57ae325
5b1ebcc
bbcf97a
9d85995
284b291
6dd6a12
f741d0e
1776f6e
d188a1d
cb45f87
c1fee53
8944de2
9e23fbe
d1ce8f0
7485e77
5b5dc27
c50fe34
aa264e4
9139f27
0352071
8eb0d3a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -60,13 +60,19 @@ def _prompt_agent( | |||||||||||||
prompt=prompt, | ||||||||||||||
additional_keys=additional_keys, | ||||||||||||||
) | ||||||||||||||
print("<PROMPT AGENT=============================================>") | ||||||||||||||
print(prompt) | ||||||||||||||
print("<PROMPT AGENT=============================================>") | ||||||||||||||
out = llm( | ||||||||||||||
[ | ||||||||||||||
HumanMessage( | ||||||||||||||
content=prompt, | ||||||||||||||
) | ||||||||||||||
] | ||||||||||||||
).content | ||||||||||||||
print("<OUT AGENT=============================================>") | ||||||||||||||
print(repr(out)) | ||||||||||||||
print("<OUT AGENT=============================================>") | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider using logging instead of print statements for debugging. Using print statements for debugging is not recommended for production code. Consider using the - print("<OUT AGENT=============================================>")
- print(repr(out))
- print("<OUT AGENT=============================================>")
+ logger.debug("<OUT AGENT=============================================>")
+ logger.debug(repr(out))
+ logger.debug("<OUT AGENT=============================================>") Committable suggestion
Suggested change
|
||||||||||||||
assert isinstance(out, str) | ||||||||||||||
return out.strip() | ||||||||||||||
|
||||||||||||||
|
@@ -133,13 +139,19 @@ def _prompt_critique( | |||||||||||||
prompt=prompt, | ||||||||||||||
additional_keys=additional_keys, | ||||||||||||||
) | ||||||||||||||
print("<PROMPT CRITIQUE=============================================>") | ||||||||||||||
print(prompt) | ||||||||||||||
print("<PROMPT CRITIQUE=============================================>") | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider using logging instead of print statements for debugging. Using print statements for debugging is not recommended for production code. Consider using the - print("<PROMPT CRITIQUE=============================================>")
- print(prompt)
- print("<PROMPT CRITIQUE=============================================>")
+ logger.debug("<PROMPT CRITIQUE=============================================>")
+ logger.debug(prompt)
+ logger.debug("<PROMPT CRITIQUE=============================================>")
|
||||||||||||||
out = llm( | ||||||||||||||
[ | ||||||||||||||
HumanMessage( | ||||||||||||||
content=prompt, | ||||||||||||||
) | ||||||||||||||
] | ||||||||||||||
).content | ||||||||||||||
print("<OUT CRITIQUE=============================================>") | ||||||||||||||
print(repr(out)) | ||||||||||||||
print("<OUT CRITIQUE=============================================>") | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider using logging instead of print statements for debugging. Using print statements for debugging is not recommended for production code. Consider using the - print("<OUT CRITIQUE=============================================>")
- print(repr(out))
- print("<OUT CRITIQUE=============================================>")
+ logger.debug("<OUT CRITIQUE=============================================>")
+ logger.debug(repr(out))
+ logger.debug("<OUT CRITIQUE=============================================>") Committable suggestion
Suggested change
|
||||||||||||||
assert isinstance(out, str) | ||||||||||||||
return out.strip() | ||||||||||||||
|
||||||||||||||
|
@@ -208,12 +220,18 @@ def _prompt_refine( | |||||||||||||
prompt=prompt, | ||||||||||||||
additional_keys=additional_keys, | ||||||||||||||
) | ||||||||||||||
print("<PROMPT REFINE=============================================>") | ||||||||||||||
print(prompt) | ||||||||||||||
print("<PROMPT REFINE=============================================>") | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider using logging instead of print statements for debugging. Using print statements for debugging is not recommended for production code. Consider using the - print("<PROMPT REFINE=============================================>")
- print(prompt)
- print("<PROMPT REFINE=============================================>")
+ logger.debug("<PROMPT REFINE=============================================>")
+ logger.debug(prompt)
+ logger.debug("<PROMPT REFINE=============================================>") Committable suggestion
Suggested change
|
||||||||||||||
out = llm( | ||||||||||||||
[ | ||||||||||||||
HumanMessage( | ||||||||||||||
content=prompt, | ||||||||||||||
) | ||||||||||||||
] | ||||||||||||||
).content | ||||||||||||||
print("<OUT REFINE=============================================>") | ||||||||||||||
print(repr(out)) | ||||||||||||||
print("<OUT REFINE=============================================>") | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider using logging instead of print statements for debugging. Using print statements for debugging is not recommended for production code. Consider using the - print("<OUT REFINE=============================================>")
- print(repr(out))
- print("<OUT REFINE=============================================>")
+ logger.debug("<OUT REFINE=============================================>")
+ logger.debug(repr(out))
+ logger.debug("<OUT REFINE=============================================>") Committable suggestion
Suggested change
|
||||||||||||||
assert isinstance(out, str) | ||||||||||||||
return out.strip() |
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.
Consider using logging instead of print statements for debugging.
Using print statements for debugging is not recommended for production code. Consider using the
logging
module to provide better control over log levels and outputs.Committable suggestion