-
Notifications
You must be signed in to change notification settings - Fork 747
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
feat: Reward model #1271
feat: Reward model #1271
Conversation
camel/models/reward/nemetro_model.py
Outdated
if logprobs | ||
else {} | ||
) | ||
except (KeyError, IndexError): |
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.
Maybe add a log here?
except (KeyError, IndexError): | |
except (KeyError, IndexError): | |
logging.error(f"Error parsing scores: {e}") |
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.
Yeah, I think we shouldn't add the error msg into score dict, better raise 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.
thanks @Asher-hss , left some comments below.
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 @Asher-hss , as mentioned in the issue, we also want to support skywork (Seq. Classifier)
, could you also add this model?
Thanks wendong,I plan to update this model today. |
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 @Asher-hss ! Left some comments below and added one more commit here 58d7278 based on the review, feel free to review the change, I think we can add the skywork model in another PR to let this PR merged first, but please add unit test first before the merge, thanks!
camel/models/reward/nemetro_model.py
Outdated
) | ||
|
||
@api_keys_required("NVIDIA_API_KEY") | ||
def evaluate(self, messages: List[OpenAIMessage]) -> Dict[str, float]: |
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.
set messages type as List[Dict[str, str]] would suit for more general use case
The model is called |
I create a new pr to fix it now. |
Description
#889
Motivation and Context
#889
Types of changes
What types of changes does your code introduce? Put an
x
in all the boxes that apply:Implemented Tasks
Checklist
Go over all the following points, and put an
x
in all the boxes that apply.If you are unsure about any of these, don't hesitate to ask. We are here to help!